0

在我的 django 应用程序中,我正在使用 django-registration 应用程序。几个月前我正在测试注册,它运行良好。从那以后,我没有在 django-registration 中编辑任何内容,但不知何故它不再工作了。那么注册邮件不包含正确的链接:

Someone, hopefully you, signed up for a new account at domain.com using this email address. If it was you, and you'd like to activate and use your account, click the link below or copy and paste it into your web browser's address bar:

:///accounts/activate/3789be99f7426ab3e332d252900479b59a400d45/

If you didn't request this, you don't need to do anything; you won't receive any more email from us, and the account will expire automatically in seven days.

这是我的activation_email.txt

{% load humanize %}
Someone, hopefully you, signed up for a new account at domain.com using this email address. If it was you, and you'd like to activate and use your account, click the link below or copy and paste it into your web browser's address bar:

{{ protocol }}://{{ domain }}/accounts/activate/{{ activation_key }}/

If you didn't request this, you don't need to do anything; you won't receive any more email from us, and the account will expire automatically in {{ expiration_days|apnumber }} days.

所以协议和域变量没有被传递。我应该在哪里设置它们?

4

1 回答 1

2

我认为 django-registration 从 django-site 表中获取有关域的信息——您应该检查该表中的域字段或通过管理页面对其进行编辑。

您可以在此处阅读有关站点框架的信息: https ://docs.djangoproject.com/en/dev/ref/contrib/sites/

于 2013-10-29T15:53:17.130 回答