Пример #1
0
#!/usr/bin/env python
from hasnew import app, init_for
init_for('dev')
app.run('0.0.0.0', debug=True, port=8010)
Пример #2
0
def drop(env):
    "Drops database tables"
    init_for(env)
    if prompt_bool("Are you sure you want to lose all your data?"):
        db.drop_all()
Пример #3
0
def create(env):
    "Creates database tables from sqlalchemy models"
    init_for(env)
    db.create_all()
Пример #4
0
 def handle(self, *args, **kwargs):
     if 'env' in kwargs:
         init_for(kwargs.pop('env'))
     super(InitedServer, self).handle(*args, **kwargs)
Пример #5
0
 def run(self, args):
     if len(args) and not args[0].startswith('-'):
         init_for(args[0])
     super(InitedMigrations, self).run(args[1:])
Пример #6
0
def create(env):
    "Creates database tables from sqlalchemy models"
    init_for(env)
    db.create_all()
Пример #7
0
def drop(env):
    "Drops database tables"
    init_for(env)
    if prompt_bool("Are you sure you want to lose all your data?"):
        db.drop_all()
Пример #8
0
 def run(self, args):
     if len(args) and not args[0].startswith('-'):
         init_for(args[0])
     super(InitedMigrations, self).run(args[1:])
Пример #9
0
 def handle(self, *args, **kwargs):
     if 'env' in kwargs:
         init_for(kwargs.pop('env'))
     super(InitedServer, self).handle(*args, **kwargs)
Пример #10
0
#!/usr/bin/env python
from hasnew import app, init_for

init_for('dev')
app.run('0.0.0.0', debug=True, port=8010)