title: Django NameError: name 'password_reset_done' is not defined
body: <p>found some topics like this but they are older or not solved.</p>
  
  <p>Well, I'm following a youtube tutorial and I'm stuck in this part of it, I already know it's due the difference of version, I've gone to the docs and got some answers but still can't solve it by myself.</p>
  
  <p>I'll post what I think it's relevant but if you guys want another part of my code ask and I'll get it.</p>
  
  <p>the error as I said (on Traceback) is: NameError: name 'password_reset_done' is not defined</p>
  
  <p>On the tutorial he didn't done anything on views.py about this, he just added some imports on url.py that was deprecated so I fix that but the errors keeps the same...</p>
  
  <p>My accounts/urls.py:</p>
  
  <pre><code>from django.urls import path
  from . import views
  from django.contrib.auth.views import (
      login,
      logout,
      password_reset,
      PasswordResetDoneView,
      PasswordResetConfirmView,
  )
  
  
  urlpatterns = [
  
      path('', views.home),
      path('login/', login, {'template_name': 'contas/login.html'}),
      path('logout/', logout, {'template_name': 'contas/logout.html'}),
      path('register/', views.register, name='register'),
      path('perfil/', views.view_perfil, name='view_perfil'),
      path('perfil/edit/', views.edit_perfil, name='edit_perfil'),
      path('trocar-password/', views.trocar_password, name='trocar_password'),
      path('reset-password/', password_reset, name='reset_password'),
      path('reset-password/done/', password_reset_done, name='password_reset_done'),
      path('reset-password/confirm/(?P&lt;uidb64&gt;[0-9A-Za-z]+)-(?P&lt;token&gt;.+)/',
      password_reset_confirm, name='password_reset_confirm'),
  
  ]
  </code></pre>
  
  <p>just to add some more code. My views.py:</p>
  
  <pre><code>from django.shortcuts import render, redirect, HttpResponse
  from contas.forms import (
  RegistrationForm,
  EditPerfilForm,
  )
  from django.contrib.auth.models import User
  from django.contrib.auth.forms import UserChangeForm, PasswordChangeForm
  from django.contrib.auth import update_session_auth_hash
  
  
  def home(request):
      numbers = [1,2,3,4,5]
      name = 'Lucas Cyrne'
  
      args = {'myName': name, 'numbers': numbers}
      return render(request, 'contas/home.html', args)
  
  def register(request):
    if request.method=='POST':
      form = RegistrationForm(request.POST)
      if form.is_valid():
          form.save()
          return redirect('/contas')
    else:
      form = RegistrationForm()
  
    args = {'form':form}
    return render(request, 'contas/reg_form.html', args)
  
  def view_perfil(request):
      args = {'user': request.user}
      return render(request, 'contas/perfil.html', args)
  
  def edit_perfil(request):
   if request.method=='POST':
      form = EditPerfilForm(request.POST, instance=request.user)
  
      if form.is_valid():
          form.save()
          return redirect('/contas/perfil')
   else:
      form = EditPerfilForm(instance=request.user)
      args = {'form': form}
      return render(request, 'contas/edit_perfil.html', args)
  
  def trocar_password(request):
    if request.method=='POST':
      form = PasswordChangeForm(data=request.POST, user=request.user)
  
      if form.is_valid():
          form.save()
          update_session_auth_hash(request, form.user)
          return redirect('/contas/perfil')
      else:
          return redirect('/contas/trocar_password')
    else:
      form = PasswordChangeForm(user=request.user)
  
      args = {'form': form}
      return render(request, 'contas/trocar_password.html', args)
  </code></pre>