diff options
Diffstat (limited to 'app.py')
-rw-r--r-- | app.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -43,7 +43,7 @@ class UploadForm(Form): def validate_exam(form, field): exts = app.config['ALLOWED_EXTENSIONS'] - ext = map(lambda x: field.data.filename.endswith(x), exts) + ext = map(field.data.filename.endswith, exts) if not any(ext): raise ValidationError(u'Ungültiger Dateityp') @@ -60,7 +60,6 @@ class UploadForm(Form): - @app.route('/<study>/upload', methods=['GET', 'POST']) def upload(study): form = UploadForm() @@ -117,6 +116,8 @@ def study_index(study, module=None): return render_template('module_list.html', study = study, modules=fit[study].get_modules()) + + @app.route('/') def index(): get_img_path = lambda x: os.path.join('images', x +'.png') @@ -127,6 +128,8 @@ def index(): studies = studies ) + + @app.route('/403') @app.errorhandler(403) def forbidden(): |