#-*- coding:UTF-8-*- from canku.config import ProductionConfig from canku import create_app app = create_app(config=ProductionConfig()) if __name__ == '__main__': app.run()
def create_app(self): app = create_app(TestConfig()) self.twill = Twill(app, port=3000) return app
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__":
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()