【发布时间】:2015-06-25 20:23:10
【问题描述】:
我使用django-rest-auth 进行用户注册和验证电子邮件。 当用户注册时,我能够成功发送电子邮件。但是,在电子邮件验证中,我收到以下回溯错误:
File "/Library/Python/2.7/site-packages/django/core/handlers/base.py" in get_response
111. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Library/Python/2.7/site-packages/django/views/generic/base.py" in view
69. return self.dispatch(request, *args, **kwargs)
File "/Library/Python/2.7/site-packages/django/views/generic/base.py" in dispatch
87. return handler(request, *args, **kwargs)
File "/Library/Python/2.7/site-packages/django/views/generic/base.py" in get
155. return self.render_to_response(context)
File "/Library/Python/2.7/site-packages/django/views/generic/base.py" in render_to_response
130. template=self.get_template_names(),
File "/Library/Python/2.7/site-packages/django/views/generic/base.py" in get_template_names
142. "TemplateResponseMixin requires either a definition of "
Exception Type: ImproperlyConfigured at /rest-auth/registration/account-confirm-email/vjohhnrf6xpkmn1jxbzaopdn0g79tdyofumeeuyuehcuja8slyz7nzq1idyifcqk/
Exception Value: TemplateResponseMixin requires either a definition of 'template_name' or an implementation of 'get_template_names()'
关于如何解决这个问题的任何想法?
【问题讨论】:
-
错误解决了吗?
-
@Weit 您可以尝试将整个模板目录的内容从 allauth 添加到您自己的模板目录中吗?
-
不,stackoverflow.com/questions/39637865/… 我试着让它像这里一样
标签: python django django-allauth django-rest-auth