diff options
| author | Jocelyn Delande <jocelyn@crapouillou.net> | 2016-05-22 00:04:50 +0200 |
|---|---|---|
| committer | Jocelyn Delande <jocelyn@crapouillou.net> | 2016-05-31 12:10:53 +0200 |
| commit | 465deabd029e5c0701f371cc317cd2e78567b3ac (patch) | |
| tree | 8c13eb7ec6ca741e4c6b967fbe18cd49d7394f7b /budget | |
| parent | 74995f99595d30b6b3383d3761cbd730b3cb7798 (diff) | |
| download | ihatemoney-mirror-465deabd029e5c0701f371cc317cd2e78567b3ac.zip ihatemoney-mirror-465deabd029e5c0701f371cc317cd2e78567b3ac.tar.gz ihatemoney-mirror-465deabd029e5c0701f371cc317cd2e78567b3ac.tar.bz2 | |
Add a manage.py CLI (flask_script)
As it's the Flask-Migrate way to expose its commands (./manage.py db command).
In our case, it's specially useful for creating new migrations.
Diffstat (limited to 'budget')
| -rwxr-xr-x | budget/manage.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/budget/manage.py b/budget/manage.py new file mode 100755 index 0000000..e0b25a7 --- /dev/null +++ b/budget/manage.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python + +from flask.ext.script import Manager +from flask.ext.migrate import Migrate, MigrateCommand + +from run import app +from models import db + +migrate = Migrate(app, db) + +manager = Manager(app) +manager.add_command('db', MigrateCommand) + + +if __name__ == '__main__': + manager.run() |
