-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrunserver.py
More file actions
14 lines (13 loc) · 858 Bytes
/
runserver.py
File metadata and controls
14 lines (13 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#############################################################################################################
# We can restructure the application a bit into multiple modules. The only thing we have to remember is
# the following quick checklist:
# 1) the Flask application object creation has to be in the __init__.py file. That way each module can
# import it safely and the __name__ variable will resolve to the correct package.
#
# 2) all the view functions (the ones with a route() decorator on top) have to be imported in the __init__.py
# file. Not the object itself, but the module it is in. Import the view module after the application
# object is created
##############################################################################################################
from study_buddy import app
print "Starting server..."
app.run(debug=True)