Ejemplo n.º 1
0
#-*- coding:UTF-8-*-

from canku.config import ProductionConfig

from canku import create_app
app = create_app(config=ProductionConfig())

if __name__ == '__main__':
    app.run()
Ejemplo n.º 2
0
 def create_app(self):
     app = create_app(TestConfig())
     self.twill = Twill(app, port=3000)
     return app
Ejemplo n.º 3
0
from flask.ext.script import Manager, Server
from canku.config import DefaultConfig, ProductionConfig
from canku.extensions import db
from canku import create_app

manager = Manager(create_app(config=DefaultConfig()))


@manager.command
def drop_create():
    #Creates database tables
    db.drop_all()

    #Creates database tables
    db.create_all()


@manager.command
def createall():
    """Creates database tables"""
    db.create_all()


@manager.command
def dropall():
    """Creates database tables"""
    db.drop_all()


manager.add_command("runserver", Server())
if __name__ == "__main__":
Ejemplo n.º 4
0
from flask.ext.script import Manager, Server
from canku.config import DefaultConfig, ProductionConfig
from canku.extensions import db
from canku import create_app


manager = Manager(create_app(config=DefaultConfig()))

@manager.command
def drop_create():
    #Creates database tables
    db.drop_all()

    #Creates database tables
    db.create_all()


@manager.command
def createall():
    """Creates database tables"""
    db.create_all()


@manager.command
def dropall():
    """Creates database tables"""
    db.drop_all()

manager.add_command("runserver", Server())
if __name__ == "__main__":
    manager.run()
Ejemplo n.º 5
0
 def create_app(self):
     app = create_app(TestConfig())
     self.twill = Twill(app, port=3000)
     return app