Utilisation de la commande "flask" à la place de l'executable

This commit is contained in:
Guillaume Ayoub 2018-04-30 14:21:03 +02:00
parent 2590a7c995
commit a2ac859cf5
2 changed files with 2 additions and 3 deletions

View File

@ -22,4 +22,4 @@ test:
$(PYTEST) tests.py --flake8 --isort --cov=afpy --cov=tests --cov-report=term-missing
serve:
$(VENV)/bin/afpy.py
env FLASK_APP=afpy.py FLASK_ENV=development $(VENV)/bin/flask run

View File

@ -209,8 +209,7 @@ def format_rfc822_datetime(datetime_tuple):
return email.utils.formatdate(time.mktime(datetime_tuple))
if __name__ == '__main__': # pragma: no cover
if app.env == 'development': # pragma: no cover
from sassutils.wsgi import SassMiddleware
app.wsgi_app = SassMiddleware(
app.wsgi_app, {'afpy': ('sass', 'static/css', '/static/css')})
app.run(debug=True)