diff --git a/manage.py b/manage.py index 39bf6eb..ed0d327 100755 --- a/manage.py +++ b/manage.py @@ -10,9 +10,10 @@ This module contains the management functionality. """ +import os -from flaskext.script import Manager from clint.textui import puts, indent, colored +from flaskext.script import Manager from dashboard import app, g, redis_connect @@ -43,6 +44,10 @@ def clear_db(): puts('{0} deleted.'.format(colored.red(key))) +@manager.command +def migrate(): + os.system('./migrate.py') + if __name__ == '__main__': manager.run() \ No newline at end of file diff --git a/migrate.py b/migrate.py new file mode 100755 index 0000000..85959a6 --- /dev/null +++ b/migrate.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from clint.textui import puts, colored, progress, indent + +from dashboard import app, g, redis_connect +app.test_request_context('/').push() + + +redis = redis_connect() + + +def main(): + print '\o/' + + +if __name__ == '__main__': + main() \ No newline at end of file