Changed references from auth.User to get_user_model (views, forms & commands)

This commit is contained in:
Gabriel Pichot
2014-06-18 16:21:37 +02:00
parent 333429f21f
commit 27217edf4a
5 changed files with 25 additions and 5 deletions

View File

@ -13,7 +13,11 @@ through templates/helpdesk/help_api.html.
from django import forms
from django.contrib.auth import authenticate
from django.contrib.auth.models import User
try:
from django.contrib.auth import get_user_model
User = get_user_model()
except ImportError:
from django.contrib.auth.models import User
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.template import loader, Context