Fix manage.py script for migrations.

This commit is contained in:
Alexis Lahouze 2015-07-17 19:22:49 +02:00
parent 91c678ca28
commit 9227a99e79

View File

@ -1,10 +1,13 @@
#!/usr/bin/env python #!/usr/bin/env python
from flask.ext.script import Manager from flask.ext.script import Manager
from flask.ext.migrate import MigrateCommand from flask.ext.migrate import Migrate, MigrateCommand
from accountant import app from accountant import app, db
manager = Manager(app) manager = Manager(app)
migrate = Migrate(app, db)
manager.add_command('db', MigrateCommand) manager.add_command('db', MigrateCommand)
if __name__ == "__main__": if __name__ == "__main__":