Exemplo n.º 1
0
def createdb():
    db.create_all()
    #create admin
    admin = User()
    admin.username = '******'
    admin.email = '*****@*****.**'
    admin.password = '******'
    admin.is_admin = True
    db.session.add(admin)
    db.session.commit()
Exemplo n.º 2
0
def createdb():
    db.create_all()
Exemplo n.º 3
0
# coding: utf-8

from app.extentions import db
from application import application

if __name__ == '__main__':
	db.init_app(application)
	#Tell sqlalchemy which app is the current app
	with application.app_context():
		db.create_all()
	application.run()