#TODO: In RequestMixin and ResponseMixin : get_response_class/get_request_class are a bit ugly. Do we even want to be able to set the parameters on the view ?
########## Request Mixin ##########
########## Request Mixin ##########
...
@@ -41,39 +40,43 @@ class RequestMixin(object):
...
@@ -41,39 +40,43 @@ class RequestMixin(object):
`Mixin` class to enhance API of Django's standard `request`.
`Mixin` class to enhance API of Django's standard `request`.
"""
"""
_USE_FORM_OVERLOADING=True
parser_classes=()
_METHOD_PARAM='_method'
_CONTENTTYPE_PARAM='_content_type'
_CONTENT_PARAM='_content'
parsers=()
"""
"""
The set of parsers that the request can handle.
The set of parsers that the view can handle.
Should be a tuple/list of classes as described in the :mod:`parsers` module.
Should be a tuple/list of classes as described in the :mod:`parsers` module.
"""
"""
defget_request_class(self):
request_class=Request
"""
The class to use as a wrapper for the original request object.
"""
defget_parsers(self):
"""
"""
Returns a subclass of Django's `HttpRequest` with a richer API,
Instantiates and returns the list of parsers that will be used by the request