Django 激活自定义邮件文本不出现
Django activation custom email text does not appear
我都有 activation_email.txt:
{% load i18n %}
{% trans "Регистрация на сайте" %}
{% trans "Для активации Вашего аккаунта необходимо перейти по ссылке" %}:
http://{{ site }}{% url 'registration_activate' activation_key %}
{% trans "Спасибо" %}!
和activation_email_subject.txt:
{% load i18n %}
{% trans "Активация аккаунта" %} - {{ site }}
在我的注册文件夹中,但我的激活电子邮件没有来自 activation_email.txt 的文本,它们有一些常见的 django 消息,例如:
You (or someone pretending to be you) have asked to register an
account at %company%. If this wasn't you, please ignore this email
and your address will be removed from our records.
To activate this account, please click the following link within the
next 2 days:
%link%
Sincerely, %company% Management
尽管主题取自我的 activation_email_subject.txt 文件。任何想法表示赞赏
我找到了解决办法。您必须将 REGISTRATION_EMAIL_HTML = False
添加到您的 django 设置文件中才能解决问题。
这对我也有用。将 REGISTRATION_EMAIL_HTML = False
放入设置中可以让您自定义 activation_email.txt
我都有 activation_email.txt:
{% load i18n %}
{% trans "Регистрация на сайте" %}
{% trans "Для активации Вашего аккаунта необходимо перейти по ссылке" %}:
http://{{ site }}{% url 'registration_activate' activation_key %}
{% trans "Спасибо" %}!
和activation_email_subject.txt:
{% load i18n %}
{% trans "Активация аккаунта" %} - {{ site }}
在我的注册文件夹中,但我的激活电子邮件没有来自 activation_email.txt 的文本,它们有一些常见的 django 消息,例如:
You (or someone pretending to be you) have asked to register an account at %company%. If this wasn't you, please ignore this email and your address will be removed from our records.
To activate this account, please click the following link within the next 2 days:
%link%
Sincerely, %company% Management
尽管主题取自我的 activation_email_subject.txt 文件。任何想法表示赞赏
我找到了解决办法。您必须将 REGISTRATION_EMAIL_HTML = False
添加到您的 django 设置文件中才能解决问题。
这对我也有用。将 REGISTRATION_EMAIL_HTML = False
放入设置中可以让您自定义 activation_email.txt