Merge pull request #3062 from EJEP/master

Add comment about using factory function in __init__.py
This commit is contained in:
David Lord 2019-01-04 14:35:14 -08:00 committed by GitHub
commit afb7e4ee5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,6 +61,11 @@ For most applications the following file should be sufficient::
from yourapplication import app as application
If a factory function is used in a :file:`__init__.py` file, then the function should be imported::
from yourapplication import create_app
application = create_app()
If you don't have a factory function for application creation but a singleton
instance you can directly import that one as `application`.