diff --git a/startup.py b/startup.py index 3c7d57d05..9fa523781 100644 --- a/startup.py +++ b/startup.py @@ -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