migrate db

This commit is contained in:
Kenneth Reitz
2011-04-07 09:53:19 -04:00
parent 9e524563bb
commit 2e7eca2a60
2 changed files with 24 additions and 1 deletions
+6 -1
View File
@@ -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()
Executable
+18
View File
@@ -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()