【发布时间】:2013-09-26 22:16:45
【问题描述】:
所以我将我的 cms 模板移到了模板文件夹中的 /cms 文件夹中:
templates/cms/default_template.html
我将 settings.py 编辑如下:
CMS_TEMPLATES = (
('cms/default_template.html', 'Default Template'),
)
我的模板如下所示:
{% extends "base.html" %}
{% load cms_tags %}
{% block base_content %}
{% placeholder template_1_content %}
{% endblock %}
问题是它在页面加载时引发以下错误:
TemplateDoesNotExist at /en/
模板渲染时出错
3
4 {% block base_content %}
5 ***{% placeholder template_1_content %}*** -> This line is red indicating the problem is here
6 {% endblock %}
如果我删除 {% placeholder template_1_content %} 页面加载正常没有问题。 只有在添加了占位符之后,它才会无缘无故地变得疯狂。
有没有人见过这样的东西?
顺便说一句,如果我不使用 /cms 文件夹,页面将使用占位符加载。 那么占位符和文件夹位置是怎么回事???
任何帮助将不胜感激。
【问题讨论】:
标签: python django templates content-management-system django-cms