forked from orbit-oss/flask
Update docs/patterns/packages.rst
This commit is contained in:
parent
eac350d1e6
commit
c2661dd4bc
1 changed files with 1 additions and 1 deletions
|
|
@ -55,7 +55,7 @@ following quick checklist:
|
||||||
`__init__.py` file. That way each module can import it safely and the
|
`__init__.py` file. That way each module can import it safely and the
|
||||||
`__name__` variable will resolve to the correct package.
|
`__name__` variable will resolve to the correct package.
|
||||||
2. all the view functions (the ones with a :meth:`~flask.Flask.route`
|
2. all the view functions (the ones with a :meth:`~flask.Flask.route`
|
||||||
decorator on top) have to be imported when in the `__init__.py` file.
|
decorator on top) have to be imported in the `__init__.py` file.
|
||||||
Not the object itself, but the module it is in. Import the view module
|
Not the object itself, but the module it is in. Import the view module
|
||||||
**after the application object is created**.
|
**after the application object is created**.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue