aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2016-09-06 06:50:47 +0300
committerMart Raudsepp <leio@gentoo.org>2016-09-06 06:52:35 +0300
commiteb0340055871dc67b6d96287f6ec869bda674d2f (patch)
tree189b68032f90052e562d901f60225c8a1d47412f /manage.py
downloadgrumpy-eb0340055871dc67b6d96287f6ec869bda674d2f.tar.gz
grumpy-eb0340055871dc67b6d96287f6ec869bda674d2f.tar.bz2
grumpy-eb0340055871dc67b6d96287f6ec869bda674d2f.zip
Initial start of new Project Grumpy code; Hello World!
virtualenv -p python3 venv venv/bin/activate pip install -r requirements.txt ./manage.py runserver --help ./manage.py shell for a python shell with flask instance exported into "app" var ./manage.py runserver
Diffstat (limited to 'manage.py')
-rwxr-xr-xmanage.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/manage.py b/manage.py
new file mode 100755
index 0000000..b28d93a
--- /dev/null
+++ b/manage.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from flask_script import Manager, Shell
+
+from backend import app
+
+
+manager = Manager(app)
+
+def shell_context():
+ return dict(app=manager.app)
+
+manager.add_command('shell', Shell(make_context=shell_context))
+
+if __name__ == '__main__':
+ manager.run()