Skip to content

Commit 31d5ab9

Browse files
committed
优化模板
1 parent 0e492aa commit 31d5ab9

File tree

121 files changed

+1059925
-58197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+1059925
-58197
lines changed

fastapi_cli/tpl/project/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/app.py renamed to fastapi_cli/tpl/project/{{cookiecutter.project_slug}}/app.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
app = create_app()
1010
register_tortoise(app, config=settings.TORTOISE_ORM)
11+
if settings.DEBUG:
12+
from starlette.staticfiles import StaticFiles
13+
app.mount("/static", StaticFiles(directory="static"), name="static") # 注册admin页面需要的静态文件,
1114

1215
if __name__ == '__main__':
1316
import uvicorn

0 commit comments

Comments
 (0)