Python 在夹层中渲染模板时出错?
我不熟悉夹层。我从软件包中得到了反向匹配错误 找不到参数为“()”且关键字参数为“{}”的“admin_keywords_submit”的反转Python 在夹层中渲染模板时出错?,python,django,mezzanine,Python,Django,Mezzanine,我不熟悉夹层。我从软件包中得到了反向匹配错误 找不到参数为“()”且关键字参数为“{}”的“admin_keywords_submit”的反转 In template /mezzanine/mezzanine/core/templates/admin/base_site.html, error at line 37 Template error: In template /home/nyros/hs/git_br/mezzanine/mezzanine/core/templates/admin
In template /mezzanine/mezzanine/core/templates/admin/base_site.html, error at line 37
Template error:
In template /home/nyros/hs/git_br/mezzanine/mezzanine/core/templates/admin/base_site.html, error at line 37
Reverse for 'admin_keywords_submit' with arguments '()' and keyword arguments '{}' not found.
27 : {% if hide_slug_field %}.slug {display:none !important;}{% endif %}
28 : {% if singleton %}.change-view-save-another {display:none !important;}{% endif %}
29 : </style>
30 : <script>
31 : {% url "static_proxy" as static_proxy_url %}
32 : {% url "fb_browse" as fb_browse_url %}
33 : {% url "admin:index" as admin_index_url %}
34 : {% get_current_language as LANGUAGE_CODE %}
35 : window.__home_link = '<a href="{% url "home" %}">{% trans "View site" %}</a>';
36 : window.__csrf_token = '{{ csrf_token }}';
37 : window.__admin_keywords_submit_url = ' {% url "admin_keywords_submit" %} ';
38 : window.__filebrowser_url = '{{ fb_browse_url }}';
39 : window.__admin_url = '{{ admin_index_url }}';
40 : window.__static_proxy = '{{ static_proxy_url }}';
41 : window.__admin_media_prefix__ = '{% static "admin/" %}';
42 : window.__grappelli_installed = {{ settings.GRAPPELLI_INSTALLED|lower }};
43 : window.__language_code = '{{ LANGUAGE_CODE }}';
44 : </script>
45 : {% if not settings.GRAPPELLI_INSTALLED %}
46 : <script src="{% static "mezzanine/js/"|add:settings.JQUERY_FILENAME %}"></script>
47 : {% endif %}
在template/mezzanine/mezzanine/core/templates/admin/base_site.html中,第37行出现错误
模板错误:
在template/home/nyros/hs/git_br/mezzanine/mezzanine/core/templates/admin/base_site.html中,第37行出现错误
找不到参数为“()”且关键字参数为“{}”的“admin_keywords_submit”的反转。
27:{%if hide_slug_field%}.slug{display:none!重要;}{%endif%}
28:{%if singleton%}。更改视图保存另一个{显示:无!重要;}{%endif%}
29 :
30 :
31:{%url“static\u proxy”作为static\u proxy\u url%}
32:{%url“fb_浏览”作为fb_浏览_url%}
33:{%url“admin:index”作为admin\u index\u url%}
34:{%get_当前语言为语言代码%}
35:window.\u home\u link='';
36:窗口。uuCSRF_token='{{csrf_token}}';
37:窗口。uuuu admin_ukeywords_usubmit_url='{%url“admin_ukeywords_usubmit”%}';
38:window.uuu filebrowser_url={{{fb_ubrowse_url}}};
39:window.uuu admin_url={{{admin_index_url}}};
40:window.uu static_proxy='{{static_proxy_url}}}';
41:window.\uuuuu admin\u media\u前缀\uuuuu='{%static“admin/“%}';
42:窗口。uu grappelli_installed={{settings.grappelli_installed | lower};
43:window.uuu语言代码={{{language_代码}}};
44 :
45:{%if not settings.GRAPPELLI_INSTALLED%}
46 :
47:{%endif%}
我使用的是django-1.4.5。这可能是因为您的URL.py中没有包含夹层URL
("^", include("mezzanine.urls")),
乔希的正确答案。只有在夹层中使用RequestContext()才能正确发送包含设置的上下文。如果没有URL.py,很难解决此问题。。。但是这是1.4,你试过不加引号吗?谢谢你的回复。这里的url@danihp我也测试了没有引号的,但它不起作用。请确保您已将通用应用程序包括在django安装的应用程序设置中。我已将我安装的应用程序“mezzanine.core”、“mezzanine.generic”、“mezzanine.blog”,