Create manage.py
Browse files
manage.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from flask_script import Manager
|
| 2 |
+
from app import create_app
|
| 3 |
+
|
| 4 |
+
app = create_app()
|
| 5 |
+
manager = Manager(app)
|
| 6 |
+
|
| 7 |
+
@manager.command
|
| 8 |
+
def run():
|
| 9 |
+
"""Run the application."""
|
| 10 |
+
app.run()
|
| 11 |
+
|
| 12 |
+
@manager.command
|
| 13 |
+
def test():
|
| 14 |
+
"""Run the tests."""
|
| 15 |
+
import pytest
|
| 16 |
+
pytest.main(['tests'])
|
| 17 |
+
|
| 18 |
+
if __name__ == "__main__":
|
| 19 |
+
manager.run()
|