From 1c79f8862c951fd27be6caf80aa482a56ea575f4 Mon Sep 17 00:00:00 2001 From: Yaroslav Klyuyev Date: Tue, 24 Nov 2015 19:55:37 +0200 Subject: [PATCH] fixed auth beckend for django 1.8 --- rest_framework_digestauth/authentication.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rest_framework_digestauth/authentication.py b/rest_framework_digestauth/authentication.py index 2a7b3c7..f0f1fd4 100644 --- a/rest_framework_digestauth/authentication.py +++ b/rest_framework_digestauth/authentication.py @@ -13,8 +13,6 @@ from rest_framework_digestauth.utils import parse_dict_header -User = get_user_model() - backend_path = getattr( settings, 'DIGESTAUTH_BACKEND', @@ -104,6 +102,7 @@ def check_authorization_request_header(self): raise exceptions.ParseError('%s provided without qop' % c) def get_user(self): + User = get_user_model() username = self.auth_header['username'] try: username_field = 'username'