Removed global dict for questions, bound it to a local scope

This commit is contained in:
Kshitij Kotasthane 2020-10-15 13:03:16 +05:30
parent 6ff98146ee
commit b8c945f151

4
app.py
View File

@ -12,9 +12,6 @@ UPLOAD_FOLDER = './pdf/'
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
# Global quiz object
questions = dict()
@ app.route('/')
def index():
@ -27,6 +24,7 @@ def quiz():
""" Handle upload and conversion of file + other stuff """
UPLOAD_STATUS = False
questions = dict()
# Make directory to store uploaded files, if not exists
if not os.path.isdir('./pdf'):