Skip to content
Myr

Add comment about using factory function in __init__.py

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Emlyn Price · committed by Emlyn Price · parent 62621ba · Browse files · 1 file+5 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:docs/deploying/mod_wsgi.rst+5 added
59 unmodified lines
60For most applications the following file should be sufficient::6162 from yourapplication import app as application6364If a factory function is used in a :file:`__init__.py` file, then the function should be imported::6566 from yourapplication import create_app67 application = create_app()6869If you don't have a factory function for application creation but a singleton70instance you can directly import that one as `application`.7172Store that file somewhere that you will find it again (e.g.:
150 unmodified lines