Repair debug entry point after using absolute imports
Using absolute imports broke the debug target due to a Werkzeug bug: https://github.com/pallets/werkzeug/issues/461 Solution is to avoid running Flask apps using "python -m", and to use "flask run". This also gets rid of the coverage exception for "__main__.py".
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
[run]
|
|
||||||
omit =
|
|
||||||
stw_potsdam/__main__.py
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
RUN = pipenv run python -m stw_potsdam
|
RUN=FLASK_APP="stw_potsdam.views" pipenv run flask run
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
pipenv sync --dev
|
pipenv sync --dev
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
from views import app
|
|
||||||
|
|
||||||
app.run()
|
|
||||||
Reference in New Issue
Block a user