Skip to content

Commit

Permalink
Merge pull request microsoft#11 from codehawkdevs/patch-1
Browse files Browse the repository at this point in the history
Added multiline comments
  • Loading branch information
kraigb authored Nov 29, 2018
2 parents ece7ab0 + e7bd6e8 commit cc2a69a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions startup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# In this sample, the Flask app object is contained within the hello_app *module*;
# that is, hello_app contains an __init__.py along with relative imports. Because
# of this structure, a file like webapp.py cannot be run directly as the startup
# file through Gunicorn; the result is "Attempted relative import in non-package".
#
# The solution is to provide a simple alternate startup file, like this present
# startup.py, that just imports the app object. You can then just specify
# startup:app in the Gunicorn command.
"""
In this sample, the Flask app object is contained within the hello_app *module*;
that is, hello_app contains an __init__.py along with relative imports. Because
of this structure, a file like webapp.py cannot be run directly as the startup
file through Gunicorn; the result is "Attempted relative import in non-package".
The solution is to provide a simple alternate startup file, like this present
startup.py, that just imports the app object. You can then just specify
startup:app in the Gunicorn command.
"""

from hello_app.webapp import app

0 comments on commit cc2a69a

Please sign in to comment.