2021的特普通奖
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

15 lines
463 B

from app import Story, Paragraph, db
from config import C
db.drop_all()
db.create_all()
for idx, (title, text, avatar) in zip(range(1, 11), C.BEGIN_WORDS):
s = Story(id=idx, title=title, text=text, tail=idx, is_tree=(idx == 10),
avatar="/ordinary/static/img/" + avatar)
p = Paragraph(id=idx, text=text, story_id=idx, is_chosen=True,
author="初始设定")
db.session.add(s)
db.session.add(p)
db.session.commit()