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

@@ -10,7 +10,11 @@ users who don't yet have them.
from django.utils.translation import ugettext as _
from django.core.management.base import BaseCommand
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 helpdesk.models import UserSettings
from helpdesk.settings import DEFAULT_USER_SETTINGS