aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/emitters.py
diff options
context:
space:
mode:
authorCarmen Wick2011-04-04 16:16:41 -0700
committerCarmen Wick2011-04-04 16:16:41 -0700
commit39c0c07786c9fd74f280297cae383ac3ba675901 (patch)
treea4274f46ac15e5f693e0a59af19a570fdd4ea723 /djangorestframework/emitters.py
parent23d924eb9bcf0cb63f3288ae011f74b6b743f1dd (diff)
downloaddjango-rest-framework-39c0c07786c9fd74f280297cae383ac3ba675901.tar.bz2
Use cleaned_content instead of raw_content when generating a form instance for the DocumentingTemplateEmitter. This allows the form to be prepopulated with the resource's existing values.
Diffstat (limited to 'djangorestframework/emitters.py')
-rw-r--r--djangorestframework/emitters.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/djangorestframework/emitters.py b/djangorestframework/emitters.py
index 4cd462cb..2769a4f5 100644
--- a/djangorestframework/emitters.py
+++ b/djangorestframework/emitters.py
@@ -227,7 +227,7 @@ class DocumentingTemplateEmitter(BaseEmitter):
# Otherwise if we have a response that is valid against the form then use that
if not form_instance and resource.response.has_content_body:
try:
- form_instance = resource.get_bound_form(resource.response.raw_content)
+ form_instance = resource.get_bound_form(resource.response.cleaned_content)
if form_instance and not form_instance.is_valid():
form_instance = None
except: