title: TemplateDoesNotExist at /en/user/login/ when tried to visit the login url in Django 2.2
body: <p>I am upgrading a Django application from 1.11 to to 2.2. I have completed all the migrations and everything but I am facing this error constantly <code>django.template.exceptions.TemplateDoesNotExist: registration/login.html</code>. I am still currently learning Django apologies in advance if I am missing something stupidly simple.
  I have attached the error message picture <a href="https://i.stack.imgur.com/ITqNg.png" rel="nofollow noreferrer">here</a> and the files that might be relevant to this error message.
  Just for clarification in my <code>settings.py</code> I have the following under TEMPLATES:</p>
  <pre><code>TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          'DIRS': [
              os.path.join(BASE_DIR, 'templates')
          ],
          'APP_DIRS': True,
          'OPTIONS': {
              'context_processors': [
                  &quot;django.contrib.auth.context_processors.auth&quot;,
                  &quot;django.template.context_processors.debug&quot;,
                  &quot;django.template.context_processors.i18n&quot;,
                  &quot;django.template.context_processors.media&quot;,
                  &quot;django.template.context_processors.static&quot;,
                  &quot;django.template.context_processors.tz&quot;,
                  &quot;django.contrib.messages.context_processors.messages&quot;,
                  &quot;django.template.context_processors.request&quot;,
              ]
          }
      }
  ]
  </code></pre>
  <p>Here are the othert files that might help debugging:</p>
  <p><strong>urls.py</strong></p>
  <pre><code>from django.conf.urls import url, include
  from django.urls import reverse_lazy
  from userApp import views
  from django.contrib.auth import views as django_contrib_auth_views
  from django.contrib.auth.views import LoginView
  
  
  urlpatterns = [
      url(r'^register/$', views.register, name='register'),
      url(r'^profile/$', views.profile, name='profile'),
      url(r'^login/$', views.rate_limit_login, name='login'),
      url(r'^rate_limited/$', views.rate_limited, name='rate_limited'),
      url(r'^logout/$', django_contrib_auth_views.LogoutView, {'template_name': 'userApp/logged_out.html', 'next_page': '/'}, name='logout'),
      url(r'^password_change/$', django_contrib_auth_views.PasswordChangeView, {'template_name': 'userApp/password_change_form.html', 'post_change_redirect': reverse_lazy('userApp:password_change_done')}, name='password_change'),
      url(r'^password_change/done/$', django_contrib_auth_views.PasswordChangeDoneView, {'template_name': 'userApp/password_change_done.html'}, name='password_change_done'),
      url(r'^password_reset/$', django_contrib_auth_views.PasswordResetView, {'template_name': 'userApp/password_reset_form.html', 'email_template_name': 'userApp/password_reset_email.html', 'post_reset_redirect': reverse_lazy('userApp:password_reset_done')}, name='password_reset'),
      url(r'^password_reset/done/$', django_contrib_auth_views.PasswordResetDoneView, {'template_name': 'userApp/password_reset_done.html'}, name='password_reset_done'),
      url(r'^reset/(?P&lt;uidb64&gt;[0-9A-Za-z_\-]+)/(?P&lt;token&gt;[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', django_contrib_auth_views.PasswordResetConfirmView, { 'template_name': 'userApp/password_reset_confirm.html', 'post_reset_redirect': reverse_lazy('userApp:password_reset_complete')}, name='password_reset_confirm'),
      url(r'^reset/done/$', django_contrib_auth_views.PasswordResetCompleteView, {'template_name': 'userApp/password_reset_complete.html'}, name='password_reset_complete'),
  </code></pre>
  <p><strong>views.py</strong></p>
  <pre><code>from django.utils.translation import ugettext as _
  from django.http import HttpResponse
  from django.shortcuts import render, redirect, get_object_or_404
  from django.urls import reverse
  from django.contrib import messages
  from django.conf import settings
  
  from django.contrib.auth import authenticate, login
  from django.contrib.auth.views import LoginView
  from django.contrib.auth.decorators import login_required
  from ratelimit.decorators import ratelimit
  from django.forms.utils import ErrorList
  
  from .forms import MyUserCreationForm, UserProfileForm
  from .utils import ReCaptcha
  
  from django.contrib.auth import get_user_model
  User = get_user_model()
  from django.views.decorators.clickjacking import xframe_options_exempt
  
  import logging
  logger = logging.getLogger(__name__)
  
  @ratelimit(key='post:username', rate='10/5m')
  @ratelimit(key='post:password', rate='10/5m')
  @xframe_options_exempt
  def rate_limit_login(request):
      if request.user.is_authenticated:
          return redirect(request.GET.get('next', reverse('mapApp:index')))
  
      if request.limited:
          return redirect(reverse('userApp:rate_limited'))
      print('Hits')
      return LoginView.as_view()(request, template_name='userApp/login.html')
  
  def rate_limited(request):
      return render(request, 'userApp/rate_limited.html')
  </code></pre>
  <p>I have tried following the fixes on this on stackoverflow since this seems a very widespread problem for a lot of people but the solutions didnt work for me. For some reason, the login.html file is not found. I can see that existing but not sure why its not being found.</p>