我试图通过在templates/registration/password_reset_email.html
中添加此文件来重置django应用程序中的密码\u reset\u email.html模板:
{% load i18n %}{% autoescape off %}
{% blocktranslate %}You're receiving this email because you requested a password reset for your user account.{% endblocktranslate %}
{% translate "Please go to the following page and choose a new password:" %}
{% block reset_link %}
{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
{% endblock %}
{% translate 'Your username, in case you’ve forgotten:' %} {{ user.get_username }}
{% translate "Thanks for using our app!" %}
{% blocktranslate %}The team{% endblocktranslate %}
{% endautoescape %}
但是,它会引发TemplateSyntaxError:
'blocktranslate', expected 'endautoescape'. Did you forget to register or load this tag?
我做错了什么
目前没有回答
相关问题 更多 >
编程相关推荐