From 272c49685c8823068492ec9fadb7f982001244d7 Mon Sep 17 00:00:00 2001 From: Jamie Matthews Date: Tue, 11 Sep 2012 14:17:26 +0100 Subject: Better naming for properties on views, requests and responses renderers is now renderer_classes parsers is now parser_classes authentication is now authentication_classes --- djangorestframework/request.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'djangorestframework/request.py') 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): -- cgit v1.2.3