aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/request.py
diff options
context:
space:
mode:
authorSébastien Piquemal2012-01-24 21:21:10 +0200
committerSébastien Piquemal2012-01-24 21:21:10 +0200
commit714a90d7559885c15e5b2c86ef6f457fdf857ee0 (patch)
treea094bc202be4abe45cecbf6189c96f8495592913 /djangorestframework/request.py
parent8b72b7bf92ac6f0d021fcee5286505e75e075eff (diff)
downloaddjango-rest-framework-714a90d7559885c15e5b2c86ef6f457fdf857ee0.tar.bz2
documentation for request module
Diffstat (limited to 'djangorestframework/request.py')
-rw-r--r--djangorestframework/request.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/djangorestframework/request.py b/djangorestframework/request.py
index c0ae46de..40d92eef 100644
--- a/djangorestframework/request.py
+++ b/djangorestframework/request.py
@@ -1,9 +1,12 @@
"""
-The :mod:`request` module provides a `Request` class that can be used
-to replace the standard Django request passed to the views.
-This replacement `Request` provides many facilities, like automatically
-parsed request content, form overloading of method/content type/content,
-better support for HTTP PUT method.
+The :mod:`request` module provides a :class:`Request` class that can be used
+to enhance the standard `request` object received in all the views.
+
+This enhanced request object offers the following :
+
+ - content automatically parsed according to `Content-Type` header, and available as :meth:`request.DATA<Request.DATA>`
+ - full support of PUT method, including support for file uploads
+ - form overloading of HTTP method, content type and content
"""
from django.http import HttpRequest
@@ -14,7 +17,7 @@ from djangorestframework.utils import as_tuple
from StringIO import StringIO
-__all__ = ('Request')
+__all__ = ('Request',)
def request_class_factory(request):
@@ -30,6 +33,9 @@ def request_class_factory(request):
class Request(object):
+ """
+ A mixin class allowing to enhance Django's standard HttpRequest.
+ """
_USE_FORM_OVERLOADING = True
_METHOD_PARAM = '_method'