def new_container(): name = request.form.get('name') if set(name) <= set('abcdefghijklmnopqrstuvwxyz0123456789-_'): return redirect('/admin/containers') buildfile = request.form.get('buildfile') files = request.files.getlist('files[]') create_image(name=name, buildfile=buildfile, files=files) run_image(name) return redirect('/admin/containers')
def new_container(): name = request.form.get('name') if set(name) <= set('abcdefghijklmnopqrstuvwxyz0123456789-_'): return redirect(url_for('admin.list_container')) buildfile = request.form.get('buildfile') files = request.files.getlist('files[]') create_image(name=name, buildfile=buildfile, files=files) run_image(name) return redirect(url_for('admin.list_container'))
def new_container(): name = request.form.get('name') if not set(name) <= set('abcdefghijklmnopqrstuvwxyz0123456789-_'): return redirect(url_for('admin_containers.list_container')) buildfile = request.form.get('buildfile') files = request.files.getlist('files[]') utils.create_image(name=name, buildfile=buildfile, files=files) utils.run_image(name) return redirect(url_for('admin_containers.list_container'))