title: Confirm resubmission error on back button "Python with Django"
body: <p>I built a web application where user can login and view work orders, property list and external contractors. However when I click back button on view property list page or view work orders page or view external contractors page it gives me an error saying confirm resubmission.
  <a href="https://i.stack.imgur.com/SQncr.png" rel="nofollow noreferrer">Error screenshot</a></p>
  
  <pre><code>def user_login(request):
  if request.method == 'POST':
      form = LoginForm(request.POST)
      if form.is_valid():
          cd = form.cleaned_data
          user = authenticate(username=cd['username'], password=cd['password'])
  
          if user is not None:
              if user.is_active:
                  login(request, user)
                  if request.user.username == 'propertymanager':
                      #return HttpResponse('Authenticated successfully')
                      return render(request, 'account/dashboard.html', {'section': dashboard})
                  elif request.user.username == 'technician1':
                      #return HttpResponse('Authenticated successfully')
                      return render(request, 'account/technician_dashboard.html', {'section': dashboard})
                  elif request.user.username == 'technician2':
                      return render(request, 'account/technician2_dashboard.html',{'section': technician2_dashboard})
                  else:
                      return render(request, 'registration/incorrect_user.html', {'section':incorrect_user})
              else:
                  return HttpResponse('Disabled account')
          else:
              return render(request, 'registration/login.html', {'section': incorrect_login})
      else:
          return render(request, 'registration/login.html', {'section': incorrect_login})
  else:
      form = LoginForm()
      return render(request, 'account/login.html', {'form': form})
  </code></pre>
  
  <p>I tried replacing the last else with dashboard page</p>
  
  <pre><code>                else:
                  return HttpResponse('Disabled account')
          else:
              return render(request, 'registration/login.html', {'section': incorrect_login})
      else:
          return render(request, 'registration/login.html', {'section': incorrect_login})
  else:
      return render(request, 'account/dashboard.html', {'section': dashboard})
  </code></pre>
  
  <p>But now my login button doesn't work.
  <strong>Need Help! When I am on view property list page and click back button I should be able to see the dashboard</strong></p>