现在的位置: 首页 > 综合 > 正文

[原]django中使用静态文件

2018年08月29日 ⁄ 综合 ⁄ 共 139字 ⁄ 字号 评论关闭
1.使用模板文件

在setting.py中设置TEMPLATE_DIRS,添加
os.path.join(os.path.dirname(__file__),
'template').replace('\\', '/'),
注:我的template文件夹与setting.py在同一文件夹

抱歉!评论已关闭.