예제 #1
0
파일: admin.py 프로젝트: Saffana/CTFd
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'))
예제 #3
0
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'))