mirror of https://github.com/pallets/flask.git
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
This commit is contained in:
parent
59104db2f2
commit
fa087c8929
|
|
@ -55,7 +55,7 @@ into this file, :file:`flaskr/__init__.py`:
|
||||||
|
|
||||||
.. sourcecode:: python
|
.. sourcecode:: python
|
||||||
|
|
||||||
from flaskr import app
|
from .flaskr import app
|
||||||
|
|
||||||
This import statement brings the application instance into the top-level
|
This import statement brings the application instance into the top-level
|
||||||
of the application package. When it is time to run the application, the
|
of the application package. When it is time to run the application, the
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
from flaskr import app
|
from .flaskr import app
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
[aliases]
|
[tool:pytest]
|
||||||
test=pytest
|
test=pytest
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue