Python 无效的块标记:';渲染占位符';

Python 无效的块标记:';渲染占位符';,python,django,django-templates,django-cms,Python,Django,Django Templates,Django Cms,我正试图在我的模板中呈现一个占位符,我已经将它放入了一个定制的CMS插件中。问题是它告诉我“render\u placeholder”标记是无效的块标记 这是带有“render\u placeholder”标记的模板 {% extends 'base.html' %} {% block base_content %} <h2>Posts</h2> {% if posts %} {% for post in posts %} <div class=

我正试图在我的模板中呈现一个占位符,我已经将它放入了一个定制的CMS插件中。问题是它告诉我“render\u placeholder”标记是无效的块标记

这是带有“render\u placeholder”标记的模板

{% extends 'base.html' %}

{% block base_content %}

<h2>Posts</h2>
{% if posts %}
    {% for post in posts %}
    <div class="entry-list">
        {{ post.posted|date:"M d" }}
        <h3><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h3>
            {% render_placeholder post.body %}
        <a href="{{ post.get_absolute_url }}">Read More</a>
        </div>
    {% endfor %}
{% else %}
    <p>There are no posts.</p>
{% endif %}

{% endblock %}
{%extends'base.html%}
{%block base_content%}
帖子
{%if posts%}
{posts%%中的post为%s}
{发布日期:{md}
{%render_占位符post.body%}
{%endfor%}
{%else%}
没有帖子

{%endif%} {%endblock%}
下面是显示“{%load placeholder_tags%}”的基本模板

{% load placeholder_tags cms_tags sekizai_tags static menu_tags %}
<html>
<head>
    {% render_block "css" %}
    <link href="{{ STATIC_URL }}css/styles.css" rel="stylesheet">
</head>
<body>
  {% show_menu 0 100 100 100 %}
  {% cms_toolbar %}
  {% placeholder base_content %}
  {% block base_content %}{% endblock %}
  {% render_block "js" %}
</body>
</html>
{%load placeholder_tags cms_tags sekizai_tags static menu_tags%}
{%render_块“css”%}
{%show_菜单0 100%}
{%cms\u工具栏%}
{%占位符基内容%}
{%block base_content%}{%endblock%}
{%render_块“js”%}
它不断告诉我“无效的块标记:'呈现占位符',应为'empty'或'endfor'”

我错过了什么愚蠢的事吗

提前谢谢

{% load placeholder_tags %}
将其放入调用占位符的模板中

我还需要查看您的项目文件夹结构,以确保可以访问该标记的源。它应该位于名为以下文件夹的应用程序中:

<app_name>/templatetags
<app_name>/models.py
/templatetags
/models.py

非常感谢您。我认为“{%load placeholder_tags%}”属于“base.html”,将其移动到扩展“base.html”的另一个模板中就成功了。