Skip to content

Commit cc2a69a

Browse files
authored
Merge pull request microsoft#11 from codehawkdevs/patch-1
Added multiline comments
2 parents ece7ab0 + e7bd6e8 commit cc2a69a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

startup.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
# In this sample, the Flask app object is contained within the hello_app *module*;
2-
# that is, hello_app contains an __init__.py along with relative imports. Because
3-
# of this structure, a file like webapp.py cannot be run directly as the startup
4-
# file through Gunicorn; the result is "Attempted relative import in non-package".
5-
#
6-
# The solution is to provide a simple alternate startup file, like this present
7-
# startup.py, that just imports the app object. You can then just specify
8-
# startup:app in the Gunicorn command.
1+
"""
2+
In this sample, the Flask app object is contained within the hello_app *module*;
3+
that is, hello_app contains an __init__.py along with relative imports. Because
4+
of this structure, a file like webapp.py cannot be run directly as the startup
5+
file through Gunicorn; the result is "Attempted relative import in non-package".
6+
7+
The solution is to provide a simple alternate startup file, like this present
8+
startup.py, that just imports the app object. You can then just specify
9+
startup:app in the Gunicorn command.
10+
"""
911

1012
from hello_app.webapp import app

0 commit comments

Comments
 (0)