aboutsummaryrefslogtreecommitdiffstats
path: root/flywheel/emitters.py
diff options
context:
space:
mode:
authortom christie tom@tomchristie.com2011-01-30 11:00:20 +0000
committertom christie tom@tomchristie.com2011-01-30 11:00:20 +0000
commit250ab0f609f32cd3e004e1f2711f9c2e4fd9b57c (patch)
tree915eeda0528dab3159958500c117e9285bc56ef3 /flywheel/emitters.py
parent40f47a9fb31aebd965dce03ae57c036d5360d124 (diff)
downloaddjango-rest-framework-250ab0f609f32cd3e004e1f2711f9c2e4fd9b57c.tar.bz2
Lots of docs, trying to tidy up examples...
Diffstat (limited to 'flywheel/emitters.py')
-rw-r--r--flywheel/emitters.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/flywheel/emitters.py b/flywheel/emitters.py
index 57e95ec2..f548e1d9 100644
--- a/flywheel/emitters.py
+++ b/flywheel/emitters.py
@@ -83,16 +83,15 @@ class DocumentingTemplateEmitter(BaseEmitter):
provide a form that can be used to submit arbitrary content."""
# Get the form instance if we have one bound to the input
form_instance = resource.form_instance
- print form_instance
# Otherwise if this isn't an error response
# then attempt to get a form bound to the response object
if not form_instance and resource.response.has_content_body:
try:
form_instance = resource.get_form(resource.response.raw_content)
+ if form_instance:
+ form_instance.is_valid()
except:
- pass
- if form_instance and not form_instance.is_valid():
form_instance = None
# If we still don't have a form instance then try to get an unbound form