mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-28 19:03:14 +01:00
Changed references from auth.User to get_user_model (views, forms & commands)
This commit is contained in:
parent
333429f21f
commit
27217edf4a
@ -13,8 +13,12 @@ from django import forms
|
||||
from django.forms import extras
|
||||
from django.core.files.storage import default_storage
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import User
|
||||
from django.utils.translation import ugettext as _
|
||||
try:
|
||||
from django.contrib.auth import get_user_model
|
||||
User = get_user_model()
|
||||
except ImportError:
|
||||
from django.contrib.auth.models import User
|
||||
try:
|
||||
from django.utils import timezone
|
||||
except ImportError:
|
||||
|
@ -10,6 +10,10 @@ users who don't yet have them.
|
||||
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.core.management.base import BaseCommand
|
||||
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
|
||||
|
@ -13,6 +13,10 @@ through templates/helpdesk/help_api.html.
|
||||
|
||||
from django import forms
|
||||
from django.contrib.auth import authenticate
|
||||
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
|
||||
|
@ -7,6 +7,10 @@ views/feeds.py - A handful of staff-only RSS feeds to provide ticket details
|
||||
to feed readers or similar software.
|
||||
"""
|
||||
|
||||
try:
|
||||
from django.contrib.auth import get_user_model
|
||||
User = get_user_model()
|
||||
except ImportError:
|
||||
from django.contrib.auth.models import User
|
||||
from django.contrib.syndication.views import Feed
|
||||
from django.core.urlresolvers import reverse
|
||||
|
@ -11,6 +11,10 @@ from datetime import datetime, timedelta
|
||||
import sys
|
||||
|
||||
from django.conf import settings
|
||||
try:
|
||||
from django.contrib.auth import get_user_model
|
||||
User = get_user_model()
|
||||
except ImportError:
|
||||
from django.contrib.auth.models import User
|
||||
from django.contrib.auth.decorators import login_required, user_passes_test
|
||||
from django.core.files.base import ContentFile
|
||||
|
Loading…
Reference in New Issue
Block a user