title: The current path, account/login/, didn't match any of these?
body: <p>I'm trying to access my project (local), and I am getting this traceback:</p>
  
  <p>traceback</p>
  
  <pre><code>Page not found (404)
  Request Method:
  GET
  Request URL:
  http://127.0.0.1:8000/account/login/
  Using the URLconf defined in tutorial.urls, Django tried these URL patterns, in this order: 
  [name='login_redirect'] 
  admin/ 
  account/ ^$ 
  account/ ^login$ 
  account/ ^logout$ 
  account/ ^register$ [name='register'] 
  account/ ^profile$ [name='view_profile'] 
  account/ ^profile/edit$ [name='edit_profile'] 
  account/ ^change-password$ [name='change_password'] 
  account/ ^reset-password$ [name='reset_password'] 
  account/ ^reset-password/done$ [name='password_reset_done'] 
  account/ ^reset-password/confirm(?P&lt;uidb64&gt;[0-9A-Za-z_\-]+)/(?P&lt;token&gt;[0-9A- Za-z]{1,13}-[0-9A-Za-z]{1,23})/$ [name='password_reset_confirm'] 
  account/ ^reset-password/complete$ [name='password_reset_complete'] 
  The current path, account/login/, didn't match any of these. 
  </code></pre>
  
  <p>Main/urls.py</p>
  
  <pre><code>from django.contrib import admin
  from django.urls import path, re_path, include
  from tutorial import views
  
  urlpatterns = [
  path('', views.login_redirect, name='login_redirect'),
  path('admin/', admin.site.urls),
  path('account/', include('accounts.urls')),
  ]
  </code></pre>
  
  <p>project/urls.py</p>
  
  <pre><code>from django.conf.urls import url
  from . import views
  from django.contrib.auth import views as auth_views
  from django.contrib.auth.views import (
  
  PasswordResetView,
  PasswordResetDoneView,
  PasswordResetConfirmView,
  PasswordResetCompleteView,
  
  )
  
  from django.urls import re_path
  
  
  urlpatterns = [
  url(r'^$', views.home),
  url(r'^login$', auth_views.LoginView.as_view(template_name='accounts/login.html')),
  url(r'^logout$', auth_views.LogoutView.as_view(template_name='accounts/logout.html')),
  url(r'^register$', views.register, name='register'),
  url(r'^profile$', views.view_profile, name='view_profile'),
  url(r'^profile/edit$', views.edit_profile, name='edit_profile'),
  url(r'^change-password$', views.change_password, name='change_password'),
  url(r'^reset-password$', PasswordResetView.as_view(), name='reset_password'),
  url(r'^reset-password/done$', PasswordResetDoneView.as_view(), name='password_reset_done'),
  url(r'^reset-password/confirm(?P&lt;uidb64&gt;[0-9A-Za-z_\-]+)/(?P&lt;token&gt;[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,23})/$',
      PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
  url(r'^reset-password/complete$', PasswordResetCompleteView.as_view(), name='password_reset_complete'),
  ]
  </code></pre>
  
  <p>middleware.py</p>
  
  <pre><code>import re
  from django.conf import settings
  from django.shortcuts import redirect
  
  
  class LoginRequiredMiddleware:
  
  def __init__(self, get_response):
      self.get_response = get_response
  
  def __call__(self, request):
      response = self.get_response(request)
      return response
  
  def process_view(self, request, view_func, view_args, view_kwargs):
      assert hasattr(request, 'user')
  
      if not request.user.is_authenticated:
          if True:
              return redirect(settings.LOGIN_URL)
  </code></pre>
  
  <p>settings.py</p>
  
  <pre><code>LOGIN_REDIRECT_URL = '/account/login'
  LOGIN_URL = '/account/login/'
  </code></pre>
  
  <p>What is the problem here?. The redirect works, I have a feeling its in urlpatterns but cannot for the life figure it out. Driving me crazy today. Thanks for the help and sorry for the essay!</p>