from django.shortcuts import render


def index(request):
    if not request.user.is_authenticated():
        return render(request, 'account/index.html')

    else:
        return render(request, 'account/user_home.html')

from django.core.urlresolvers import reverse
from django.shortcuts import redirect, render


def index(request):
    if not request.user.is_authenticated():
        return render(request, 'account/index.html')

    else:
        return redirect(reverse('quizzes:index'))

Use quiz index as user home temporarily
Use quiz index as user home temporarily

+ from django.core.urlresolvers import reverse
- from django.shortcuts import render
+ from django.shortcuts import redirect, render
  
  
  def index(request):
      if not request.user.is_authenticated():
          return render(request, 'account/index.html')
  
      else:
-         return render(request, 'account/user_home.html')
+         return redirect(reverse('quizzes:index'))
  
Use quiz index as user home temporarily
## Code Before:
from django.shortcuts import render


def index(request):
    if not request.user.is_authenticated():
        return render(request, 'account/index.html')

    else:
        return render(request, 'account/user_home.html')

## Instruction:
Use quiz index as user home temporarily
## Code After:
from django.core.urlresolvers import reverse
from django.shortcuts import redirect, render


def index(request):
    if not request.user.is_authenticated():
        return render(request, 'account/index.html')

    else:
        return redirect(reverse('quizzes:index'))
