Former-commit-id:06a8b51d6d
[formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f] Former-commit-id:9f19e3f712
17 lines
441 B
Python
Executable file
17 lines
441 B
Python
Executable file
#!/usr/bin/env python
|
|
from werkzeug import script
|
|
|
|
def make_app():
|
|
from shorty.application import Shorty
|
|
return Shorty('sqlite:////tmp/shorty.db')
|
|
|
|
def make_shell():
|
|
from shorty import models, utils
|
|
application = make_app()
|
|
return locals()
|
|
|
|
action_runserver = script.make_runserver(make_app, use_reloader=True)
|
|
action_shell = script.make_shell(make_shell)
|
|
action_initdb = lambda: make_app().init_database()
|
|
|
|
script.run()
|