Utilisation de la commande "flask" à la place de l'executable
This commit is contained in:
parent
2590a7c995
commit
a2ac859cf5
2
Makefile
2
Makefile
|
@ -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
|
||||
|
|
3
afpy.py
3
afpy.py
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user