Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

548
Visualizações
In django-rest-auth, the password reset confirm URL doesn't work--is it missing arguments?

If you look at urlpatterns in django.contrib.auth.urls, the password_reset_confirm URL takes uidb64 and token params, which makes sense--when clicked on, this will identify the user resetting the password. However, django-rest-auth's rest_password_reset_confirm URL doesn't take any arguments: it just goes to password/reset/confirm/. How can it work? I get the following 500 error when submitting my email to reset my password, and I'm not surprised--the error makes sense:

NoReverseMatch: Reverse for 'password_reset_confirm' with arguments '()' and keyword arguments '{u'uidb64': 'NA', u'token': u'4lj-65cd7b4219c9206126b4'}' not found.

What I don't understand is it seems like such a basic thing that I must be doing something wrong--otherwise everyone using django-rest-auth would get this error because the arguments are clearly missing in the URL definition. Has anyone else experienced it and if so, did you update the URL to fix it?

UPDATE: It looks like django-rest-auth, by default, simply uses native Django's contrib/admin/templates/registration/password_reset_email.html template.

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Turns out there's a simple one-line fix--add this to your base url patterns:

url(r'^', include('django.contrib.auth.urls')),
over 4 years ago · Santiago Trujillo Relatório

0

I have used following once in my template:

{% url 'django.contrib.auth.views.password_reset_confirm' uidb64=uid token=token %}

And, it works fine. Can you please show your template include structure?

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda