我试图将'comment.html'包含到store.html和store.html extend base.html中。Django包含无法找到模板
但Django是抛出错误comment.html (<class 'django.template.base.TemplateDoesNotExist'>)
所有模板都在同一目录。 store.html
工作正常,当我包括comment.html
在store.html
错误抛出... 我用{% include "comment.html" %}
这包括comment.html
到store.html
它是正确扩展base.html
没有任何问题。但
迪尔棵树,这些文件位于: vaibhav @ ubuntu:〜/ TRAC/bright-coupons/brightCoupons/brightCouponsApp $ tree 。
├── __init__.py
├── models.py
├── templates
│ ├── about.html
│ ├── base.html
│ ├── comment.html
│ ├── contact.html
│ ├── error.html
│ ├── index.html
│ ├── index-var.html
│ ├── store.html
│ ├── stores.html
│ ├── submit-form.php
│ ├── support.html
│ └── tags.html
├── tests.py
├── views.py
重新检查文件名。 – Rohan 2013-05-02 10:01:41
did..checked ...在Django扩展和包含在相同的模板是否支持? – 2013-05-02 10:04:07
是的,它是支持的,不应该是问题。你的'{%extend%}'行是什么? – Rohan 2013-05-02 10:10:57