SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
UPLOADED_PHOTOS_DEST = os.getcwd()
form = File_Upload_Form()
photos = UploadSet('photos', IMAGES)
filename = photos.save(form.file.data)
file_url = photos.url(filename)
return render_template('exam.html', form = form)
AssertionError: A setup function was called after the first request was handled. This usually indicates a bug in the application where a module was not imported and decorators or other functionality was called too late. To fix this make sure to import all your view modules, database models and everything related at a central place before the application starts serving requests.