mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-01 19:10:12 +03:00
Merge 363c138ed2
into 8d83ff8e6c
This commit is contained in:
commit
9dd1d577ac
|
@ -82,11 +82,8 @@ def get_concrete_model(model_cls):
|
||||||
|
|
||||||
# Django 1.5 add support for custom auth user model
|
# Django 1.5 add support for custom auth user model
|
||||||
if django.VERSION >= (1, 5):
|
if django.VERSION >= (1, 5):
|
||||||
from django.conf import settings
|
from django.contrib.auth import get_user_model
|
||||||
if hasattr(settings, 'AUTH_USER_MODEL'):
|
User = get_user_model()
|
||||||
User = settings.AUTH_USER_MODEL
|
|
||||||
else:
|
|
||||||
from django.contrib.auth.models import User
|
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
|
Loading…
Reference in New Issue
Block a user