Skip to content

Commit 06b8d8c

Browse files
committed
refactor: 将plugin_init脚本移至根目录下
1 parent 9999845 commit 06b8d8c

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

app/plugins/oss/info.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
__name__ = 'oss'
12
__version__ = '0.0.1'
23
__author__ = 'Lin team'

app/plugins/poem/app/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ def initial_data():
1212

1313
app = create_app()
1414
with app.app_context():
15+
data = Poem.query.limit(1).all()
16+
if data:
17+
return
1518
with db.auto_commit():
1619
# 添加诗歌
1720
img_url = 'http://yanlan.oss-cn-shenzhen.aliyuncs.com/gqmgbmu06yO2zHD.png'
File renamed without changes.

0 commit comments

Comments
 (0)