Django post()获取了意外的关键字参数';uidb64';重置密码rest\u auth

Django post()获取了意外的关键字参数';uidb64';重置密码rest\u auth,django,django-rest-framework,django-allauth,django-rest-auth,Django,Django Rest Framework,Django Allauth,Django Rest Auth,现在,我正在使用rest_auth重置密码,无论发送什么电子邮件,URL都会像这样打开,但我在上面添加了值: 这是我单击电子邮件中发送的URL时的页面: 在填写字段并发出post请求后,我得到以下信息: 这就是我得到的错误: 这是我的网址: urlpatterns = [ path('', include('rest_auth.urls')), path('login/', LoginView.as_view(), name='account_login'), path('registrat

现在,我正在使用rest_auth重置密码,无论发送什么电子邮件,URL都会像这样打开,但我在上面添加了值: 这是我单击电子邮件中发送的URL时的页面:

在填写字段并发出post请求后,我得到以下信息: 这就是我得到的错误:

这是我的网址:

urlpatterns = [
path('', include('rest_auth.urls')),
path('login/', LoginView.as_view(), name='account_login'),
path('registration/', include('rest_auth.registration.urls')),
path('registration/', RegisterView.as_view(), name='account_signup'),
re_path(r'^account-confirm-email/', VerifyEmailView.as_view(),
     name='account_email_verification_sent'),
re_path(r'^account-confirm-email/(?P<key>[-:\w]+)/$', VerifyEmailView.as_view(),
     name='account_confirm_email'),
re_path(r'^password/reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', PasswordResetConfirmView.as_view(),
     name='password_reset_confirm')
]

URLconf导致使用两个KWARG调用post方法–uidb64和令牌–但是您的post方法不接受任何KWARG。要消除错误,只需将KWARG添加到post方法签名:

def post(self, request, *args, **kwargs):
    # ...

URLconf导致使用两个KWARG调用post方法–uidb64和令牌–但是您的post方法不接受任何KWARG。要消除错误,只需将KWARG添加到post方法签名:

def post(self, request, *args, **kwargs):
    # ...

您在表格中填写的值是什么?值:您在表格中填写的值是什么?值: