title: from django.contrib.auth.forms import UserCreationForm causing django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet
body: <p>So I see a lot of questions about the infamous "django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet." yet I cannot find anyone solving my problem as it doesn't have anything to do with my INSTALLED_APPS and it only goes away when I comment out the UserCreationForm.I am trying to create a basic signup page and UserCreationForm is the best way to do that. So does anyone know what I need to do to fix this? My lack of knowledge of this situation and of Django doesn't seem to help either but this seems as if it is a simple fix. Thank you for the help :).</p>
  
  <p><strong>Here is all code I believe is relevant.</strong></p>
  
  <p><strong>In settings.py</strong></p>
  
  <pre><code>    INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'hello.views',]
  </code></pre>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>from django.contrib import admin
  from django.urls import path
  from hello.views import myView
  from hello.views import myHome
  from hello.views import home
  from hello.views import index
  from hello.views import game
  from hello.views import main
  from hello.views import signup
  from django.contrib.auth import views as auth_views
  from django.views.generic.base import TemplateView
  from django.conf.urls import url, include
  urlpatterns = [
      url(r'^admin/',admin.site.urls),
      url(r'^hello/',include('hello.urls')),
      path('sayHello/', myView),
      path('home/',home,name='Home'),
      path('game/',game,name="Game"),
      path('home/game.html',game),
      path('home/home.html',home),
      path('game/game.html',game),
      path('game/home.html',home),
      path('main/',main),
      path('signup/',signup, name="signup"),
      url(r'^login/$', auth_views.LoginView.as_view(template_name= 'login.html'), name='login'),
      url(r'^logout/$', auth_views.LogoutView.as_view(template_name= 'logged_out.html'), name='logout'),
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>from django.shortcuts import render, redirect
  from django.http import HttpResponse
  from django.contrib.auth import login, authenticate
  from django.contrib.auth.forms import UserCreationForm
  #from django.contrib.auth.forms import AuthenticationForm, UserCreationForm
  #from .models import Question
  
  memo = []
  def myView(request):
      return HttpResponse('Hello, Surya!')
  
  def myHome(request):
      return HttpResponse("This is going to be the main page.")
  def home(request):
      numbers = [1,2,3,4,5]
      name = 'Jeevan Anand'
  
      args = {'myName': name, 'numbers': numbers}
      return render(request,'home.html',context = args)
  def index(request):
      return render(request,'index.html')
  def game(request):
      numbers = [1,2,3,4,5]
      name = 'Jeevan Anand'
  
      args = {'myName': name, 'numbers': numbers}
      return render(request,'game.html',context = args)
  def main(request):
      numbers = [1,2,3,4,5]
      name = 'Jeevan Anand'
  
      args = {'myName': name, 'numbers': numbers}
      return render(request,'main.html',context = args)
  def signup(request):
      if request.method =='POST':
          form = UserCreationForm(request.POST)
          if form.is_valid():
              form.save()
              username = form.cleaned_data.get('username')
              raw_password = form.cleaned_data.get('password1')
              user = authenticate(username=username, password=raw_password)
              return redirect('http://127.0.0.1:8000/login/')
      else:
          form = UserCreationForm()
      return render(request,'hello/signup.html',{'form':form})
  
  def login_view(request):
      if request.method =='POST':
          form = AuthenticationForm(data=request.POST)
          if form.is_valid():
              #log in the user
              return redirect('articles:list')
      else:
          form = AuthenticationForm()
      return render(request,'hello/login.html',{'from':form})
  </code></pre>