From 43b4ae752d20a1752e3430f0792552b801a4d347 Mon Sep 17 00:00:00 2001 From: Petros Moisiadis Date: Tue, 19 May 2015 18:00:17 +0300 Subject: [PATCH] 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). --- rest_framework/authentication.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py index b03e7c167..0d73a5846 100644 --- a/rest_framework/authentication.py +++ b/rest_framework/authentication.py @@ -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): """