Browse Source

Fixes import statement in flaskr (#2068)

- `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
pull/2418/head
Kyle Lawlor 8 years ago committed by Markus Unterwaditzer
parent
commit
fa087c8929
  1. 2
      docs/tutorial/packaging.rst
  2. 2
      examples/flaskr/flaskr/__init__.py
  3. 2
      examples/flaskr/setup.cfg

2
docs/tutorial/packaging.rst

@ -55,7 +55,7 @@ into this file, :file:`flaskr/__init__.py`:
.. sourcecode:: python
from flaskr import app
from .flaskr import app
This import statement brings the application instance into the top-level
of the application package. When it is time to run the application, the

2
examples/flaskr/flaskr/__init__.py

@ -1 +1 @@
from flaskr import app
from .flaskr import app

2
examples/flaskr/setup.cfg

@ -1,2 +1,2 @@
[aliases]
[tool:pytest]
test=pytest

Loading…
Cancel
Save