aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/content.py
diff options
context:
space:
mode:
authorspiq2011-03-04 17:23:18 +0200
committerspiq2011-03-04 17:23:18 +0200
commit2169c85dbb011beb411a5c37ebc8d700b0984ce8 (patch)
treef755b295dec22e57d37d5777422b77bb42215b69 /djangorestframework/content.py
parent033c0ae797e0bbb39a0687592d5b5f8eceb4d4dd (diff)
downloaddjango-rest-framework-2169c85dbb011beb411a5c37ebc8d700b0984ce8.tar.bz2
FomrParser now implements a work around for empty values in a list
Diffstat (limited to 'djangorestframework/content.py')
-rw-r--r--djangorestframework/content.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/djangorestframework/content.py b/djangorestframework/content.py
index dd40f8f1..fe1a56d9 100644
--- a/djangorestframework/content.py
+++ b/djangorestframework/content.py
@@ -49,6 +49,9 @@ class SocketFile(File):
class OverloadedContentMixin(ContentMixin):
"""HTTP request content behaviour that also allows arbitrary content to be tunneled in form data."""
+ #TODO: test PUT
+ #TODO: rewrite cleaner
+
"""The name to use for the content override field in the POST form."""
CONTENT_PARAM = '_content'
@@ -59,7 +62,7 @@ class OverloadedContentMixin(ContentMixin):
"""If the request contains content return a tuple of (content_type, content) otherwise return None.
Note that content_type may be None if it is unset."""
if not request.META.get('CONTENT_LENGTH', None) and not request.META.get('TRANSFER_ENCODING', None):
- return None
+ return None # TODO : Breaks, because determine_content should return a tuple.
content_type = request.META.get('CONTENT_TYPE', None)
if (request.method == 'POST' and self.CONTENT_PARAM and