Commit 43b4ae75 by Petros Moisiadis

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).
parent a1307548
...@@ -4,12 +4,11 @@ Provides various authentication policies. ...@@ -4,12 +4,11 @@ Provides various authentication policies.
from __future__ import unicode_literals from __future__ import unicode_literals
import base64 import base64
from django.contrib.auth import authenticate from django.contrib.auth import authenticate
from django.contrib.auth import get_user_model
from django.middleware.csrf import CsrfViewMiddleware from django.middleware.csrf import CsrfViewMiddleware
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from rest_framework import exceptions, HTTP_HEADER_ENCODING from rest_framework import exceptions, HTTP_HEADER_ENCODING
from rest_framework.authtoken.models import Token from rest_framework.authtoken.models import Token
from rest_framework.compat import get_user_model
def get_authorization_header(request): def get_authorization_header(request):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment