Skip to content
Myr

Fixes import statement in flaskr (#2068)

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

- `from flaskr.flaskr import app` in flaskr/__init__.py causes an import error with Python 2 - The relative import now used works for py2 and py3

authored by Kyle Lawlor · committed by Markus Unterwaditzer · parent 59104db · Browse files · 3 files+3 added−3 removed
This commit

State

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

Diff stats

3 files+3 added−3 removed

  • other:+3 added−3 removed

3 files+3 added−3 removed

modified:docs/tutorial/packaging.rst+1 added-1 removed
53 unmodified lines
54into this file, :file:`flaskr/__init__.py`:5556.. sourcecode:: python5758 from flaskr import app58 from .flaskr import app5960This import statement brings the application instance into the top-level 61of the application package. When it is time to run the application, the 62Flask development server needs the location of the app instance. This
46 unmodified lines
modified:examples/flaskr/flaskr/__init__.py+1 added-1 removed
1from flaskr import app1from .flaskr import app
modified:examples/flaskr/setup.cfg+1 added-1 removed
1[aliases]1[tool:pytest]2test=pytest