From bd20d0ff1c7a582f3c53d30bfc387139c419ef35 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sat, 23 Jan 2016 13:01:11 +0100 Subject: Add flask-script --- manage.py | 18 ++++++++++++++++++ requirements.txt | 1 + 2 files changed, 19 insertions(+) create mode 100755 manage.py diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..0002278 --- /dev/null +++ b/manage.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python +from flask.ext.script import Manager, Server, Shell +from app import app + + +def main(): + manager = Manager(app) + manager.add_command( + "runserver", Server(host='::', use_debugger=False)) + manager.add_command( + "debug", Server(host='::', use_debugger=True)) + manager.add_command( + "shell", Shell(make_context=lambda: dict(app=app))) + manager.run() + + +if __name__ == '__main__': + main() diff --git a/requirements.txt b/requirements.txt index 7edd959..fb03b19 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ Flask>=0.8 Flask-WTF +Flask-Script Werkzeug>=0.6 Jinja2>=2.4 WTForms>=1.0 -- cgit v1.2.3-1-g7c22