Skip to content
Myr

the import order note was meant to be bold, not cursive

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

authored by Ronny Pfannschmidt · committed by Ronny Pfannschmidt · parent 15c937b · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/patterns/packages.rst+1 added-1 removed
55 unmodified lines
56 `__name__` variable will resolve to the correct package.572. all the view functions (the ones with a :meth:`~flask.Flask.route`58 decorator on top) have to be imported when in the `__init__.py` file.59 Not the object itself, but the module it is in. Import the view module60 *after the application object is created*.60 **after the application object is created**.6162Here's an example `__init__.py`::6364 from flask import Flask
225 unmodified lines