コード例 #1
0
from todolist import create_app, db_session

app = create_app()

if __name__ == '__main__':
    # Необходимо поместить базу данных в данный каталог
    db_session.global_init("todolist/db/TDLDataBase.db")
    app.run()
コード例 #2
0
def app():
    app = create_app()
    return app
コード例 #3
0
#encoding:utf8

from todolist import create_app
from todolist.exts import db
from flask_script import Manager, Server
from flask_migrate import Migrate, MigrateCommand

app = create_app('default')

manager = Manager(app)
migrate = Migrate(app, db)
manager.add_command('runserver', Server(host='127.0.0.1', port=5000))
manager.add_command('db', MigrateCommand)

if __name__ == '__main__':
    manager.run()
コード例 #4
0
# -*- coding: utf-8 -*-

from todolist import create_app


application = create_app()