Import get_user_model from compat module

Import get_user_model from compat module to be compatible with older django versions (e.g. 1.4).
This commit is contained in:
Petros Moisiadis 2015-05-19 18:00:17 +03:00
parent a13075486d
commit 43b4ae752d

View File

@ -4,12 +4,11 @@ Provides various authentication policies.
from __future__ import unicode_literals
import base64
from django.contrib.auth import authenticate
from django.contrib.auth import get_user_model
from django.middleware.csrf import CsrfViewMiddleware
from django.utils.translation import ugettext_lazy as _
from rest_framework import exceptions, HTTP_HEADER_ENCODING
from rest_framework.authtoken.models import Token
from rest_framework.compat import get_user_model
def get_authorization_header(request):
"""