Django CMS Page Title Doesn't Render

…衆ロ難τιáo~ 提交于 2019-12-03 12:47:38

the {% page_attribute %} template tag only works on CMS pages. When in views controlled by django-registration, they will not work and rather return an empty string (since Django's template language should never raise exceptions on runtime). In the templates used by django-registration, you need to override the title tag.

Therefore I suggest you use <title>{% block title %}{% page_attribute page_title %}{% endblock %}</title> in your base template. Then in the registration template do something like {% block title %}Registration{% endblock %}.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!