mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-27 09:08:53 +01:00
- Use the Django 1.5 get_user_model function if it exists in Django, i.e. 1.5 and above.
This commit is contained in:
parent
cf63c61d82
commit
020d1cefae
@ -7,7 +7,11 @@ models.py - Model (and hence database) definitions. This is the core of the
|
||||
helpdesk structure.
|
||||
"""
|
||||
|
||||
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.db import models
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _, ugettext
|
||||
|
Loading…
Reference in New Issue
Block a user