Created
February 10, 2015 15:22
-
-
Save exit99/d19158f5662fc8bc4699 to your computer and use it in GitHub Desktop.
Flask shell with a manage.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
from flask.ext.script import Manager | |
from null.app import create_app | |
app = create_app() | |
manager = Manager(app) | |
@manager.shell | |
def shell(): | |
return { | |
'app': app, | |
'db': None, | |
'models': None, | |
} | |
if __name__ == '__main__': | |
manager.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment