aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/mixins.py
diff options
context:
space:
mode:
authorTom Christie2011-04-29 14:32:56 +0100
committerTom Christie2011-04-29 14:32:56 +0100
commitb358fbdbe9cbd4ce644c4b2c7b9b4cec0811e14e (patch)
tree601e5576995809b74f914cafcee8a7a8cd9c6937 /djangorestframework/mixins.py
parent93aa065fa92f64472a3ee80564020a81776be742 (diff)
downloaddjango-rest-framework-b358fbdbe9cbd4ce644c4b2c7b9b4cec0811e14e.tar.bz2
More refactoring - move various less core stuff into utils etc
Diffstat (limited to 'djangorestframework/mixins.py')
-rw-r--r--djangorestframework/mixins.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/djangorestframework/mixins.py b/djangorestframework/mixins.py
index 43b33f50..ebeee31a 100644
--- a/djangorestframework/mixins.py
+++ b/djangorestframework/mixins.py
@@ -1,4 +1,4 @@
-from djangorestframework.mediatypes import MediaType
+from djangorestframework.utils.mediatypes import MediaType
from djangorestframework.utils import as_tuple, MSIE_USER_AGENT_REGEX
from djangorestframework.response import ErrorResponse
from djangorestframework.parsers import FormParser, MultipartParser
@@ -397,7 +397,7 @@ class ResponseMixin(object):
class AuthMixin(object):
"""Mixin class to provide authentication and permission checking."""
- authenticators = ()
+ authentication = ()
permissions = ()
@property
@@ -407,9 +407,9 @@ class AuthMixin(object):
return self._auth
def _authenticate(self):
- for authenticator_cls in self.authenticators:
- authenticator = authenticator_cls(self)
- auth = authenticator.authenticate(self.request)
+ for authentication_cls in self.authentication:
+ authentication = authentication_cls(self)
+ auth = authentication.authenticate(self.request)
if auth:
return auth
return None