aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/request.py
diff options
context:
space:
mode:
authorJamie Matthews2012-09-11 14:17:26 +0100
committerJamie Matthews2012-09-11 14:20:35 +0100
commit272c49685c8823068492ec9fadb7f982001244d7 (patch)
treed3281dcb19809125ec94d8c419facc2b1a7ae69e /djangorestframework/request.py
parentd4f8b4cf0683923fe85652f8fd572d2931eb3074 (diff)
downloaddjango-rest-framework-272c49685c8823068492ec9fadb7f982001244d7.tar.bz2
Better naming for properties on views, requests and responses
renderers is now renderer_classes parsers is now parser_classes authentication is now authentication_classes
Diffstat (limited to 'djangorestframework/request.py')
-rw-r--r--djangorestframework/request.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/djangorestframework/request.py b/djangorestframework/request.py
index 83ee47c6..450d2ac7 100644
--- a/djangorestframework/request.py
+++ b/djangorestframework/request.py
@@ -37,9 +37,9 @@ class Request(object):
Kwargs:
- request(HttpRequest). The original request instance.
- - parsers(list/tuple). The parsers to use for parsing the
+ - parsers_classes(list/tuple). The parsers to use for parsing the
request content.
- - authentications(list/tuple). The authentications used to try
+ - authentication_classes(list/tuple). The authentications used to try
authenticating the request's user.
"""
@@ -47,10 +47,10 @@ class Request(object):
_CONTENT_PARAM = api_settings.FORM_CONTENT_OVERRIDE
_CONTENTTYPE_PARAM = api_settings.FORM_CONTENTTYPE_OVERRIDE
- def __init__(self, request, parsers=None, authentication=None):
+ def __init__(self, request, parser_classes=None, authentication_classes=None):
self._request = request
- self.parsers = parsers or ()
- self.authentication = authentication or ()
+ self.parser_classes = parser_classes or ()
+ self.authentication_classes = authentication_classes or ()
self._data = Empty
self._files = Empty
self._method = Empty
@@ -61,13 +61,13 @@ class Request(object):
"""
Instantiates and returns the list of parsers the request will use.
"""
- return [parser() for parser in self.parsers]
+ return [parser() for parser in self.parser_classes]
def get_authentications(self):
"""
Instantiates and returns the list of parsers the request will use.
"""
- return [authentication() for authentication in self.authentication]
+ return [authentication() for authentication in self.authentication_classes]
@property
def method(self):