def initdb():
"""
init database, create all tables, create user plan and create admin.
"""
print("init database...")
try:
from app.model.user import UserPlan, User, PlanUsage
from app.model.info import WebSite, Article, SiteType, Tag, tags
from app.model.subscribe import UserSub
db.create_all()
except Exception as e:
print e
try:
init_user()
except Exception:
pass
print "finish."
评论列表
文章目录