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.
 
 
 

67 lines
1.9 KiB

from app import Story, Paragraph, db
db.drop_all()
db.create_all()
BEGIN_WORDS = [
(
"候选" + "",
"男生。某传统工科。那年他收到了华清大学的录取通知书……",
"boy1.jpg"
),
(
"候选" + "",
"女生。商科和管理学科。那年她收到了华清大学的录取通知书……",
"girl1.jpg"
),
(
"候选" + "",
"男生。艺术特长生。那年他收到了华清大学的录取通知书……",
"boy2.jpg"
),
(
"候选" + "",
"女生。某热门工科。那年她收到了华清大学的录取通知书……",
"girl2.jpg"
),
(
"候选" + "",
"男生。理科。那年他收到了华清大学的录取通知书……",
"boy3.jpg"
),
(
"候选" + "",
"女生。不喜欢打扮。那年她收到了华清大学的录取通知书……",
"girl3.jpg"
),
(
"候选" + "",
"男生。喜欢穿风衣。那年他收到了华清大学的录取通知书……",
"boy4.jpg"
),
(
"候选" + "",
"女生。出门一般都戴帽子。那年她收到了华清大学的录取通知书……",
"girl4.jpg"
),
(
"候选" + "",
"猫猫。那年它不小心从西门溜进了华清大学……",
"cat.jpg"
),
(
"候选" + "",
"留学生。那年华清大学的录取通知书漂洋过海寄到了家里……",
"neutral.jpg"
),
]
for idx, (title, text, avatar) in zip(range(1, 11), BEGIN_WORDS):
s = Story(id=idx, title=title, text=text, tail=idx,
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()