小莽的后花圈 发表于 2013-1-1 22:36:47

django中include extends找不到路径

<div id="cnblogs_post_body">学习django很久,但一直断断续续,嗨,对自己的执行力简直无语。
在做模板的时候遇到个问题,分享出来:
我的模板目录是这样的:
http://pic002.cnblogs.com/images/2012/423415/2012121600451160.jpg
我的index.html继承base.html
于是我index我这么写:
{% extends 'base.html' %}
不用质疑当然报错了,
http://pic002.cnblogs.com/images/2012/423415/2012121600460966.jpg
提示base.html模板不存在,再仔细看哈报错信息
<div class="cnblogs_Highlighter">Template-loader postmortem         Django tried loading these templates, in this order:               Using loader django.template.loaders.filesystem.Loader:      E:\Project\in0839\in0839\templates\base.html (File does not exist)
页: [1]
查看完整版本: django中include extends找不到路径