首页 > 解决方案 > 将 django rest auth 与 django allauth 集成

问题描述

我正在尝试将django rest authdjango allauth 集成
我按照他们的文档所述安装了它们,但我在配置路由时遇到了问题。
这是我在我的 urls 文件中所做的:

urlpatterns = [
  re_path(r'^auth/', include('rest_auth.urls')),
  re_path(r'^auth/signup/', include('rest_auth.registration.urls')),
  ...
]

注册工作正常,但在我收到的确认电子邮件中有一个链接。单击该链接会给出 500 状态代码,但有以下例外:

TemplateResponseMixin requires either a definition of 'template_name' or an implementation of 'get_template_names()'

我做错了什么?我应该如何配置 django rest auth 和 django allauth?有没有提供分步说明的教程(我是 django 新手)?

标签: pythondjangodjango-allauthdjango-rest-auth

解决方案


推荐阅读