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.
 
 
 

57 lines
1.0 KiB

from app import Story, Paragraph, db
db.drop_all()
db.create_all()
AVATARS = [
(
"候选" + "",
"boy1.jpg"
),
(
"候选" + "",
"girl1.jpg"
),
(
"候选" + "",
"boy2.jpg"
),
(
"候选" + "",
"girl2.jpg"
),
(
"候选" + "",
"boy3.jpg"
),
(
"候选" + "",
"girl3.jpg"
),
(
"候选" + "",
"boy4.jpg"
),
(
"候选" + "",
"girl4.jpg"
),
(
"候选" + "",
"cat.jpg"
),
(
"候选" + "",
"neutral.jpg"
),
]
for idx, (title, avatar) in zip(range(1, 11), AVATARS):
s = Story(id=idx, title=title, text='', tail=idx, is_tree=(idx == 10),
avatar="/ordinary/static/img/" + avatar)
p = Paragraph(id=idx, text='', story_id=idx, is_chosen=True,
author="初始设定")
db.session.add(s)
db.session.add(p)
db.session.commit()