aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/renderers.py
diff options
context:
space:
mode:
authorTom Christie2011-06-15 14:09:01 +0100
committerTom Christie2011-06-15 14:09:01 +0100
commit7dcb851c7f1e4bc01105fc5856494c196827fe2e (patch)
tree7c0e02a8e504b66e7a33af69f8cd60ed1ad25df3 /djangorestframework/renderers.py
parent412b5fc2d54def2f2601b860b80afaa52d595e58 (diff)
downloaddjango-rest-framework-7dcb851c7f1e4bc01105fc5856494c196827fe2e.tar.bz2
Allow related models to be fully serialized
Diffstat (limited to 'djangorestframework/renderers.py')
-rw-r--r--djangorestframework/renderers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/djangorestframework/renderers.py b/djangorestframework/renderers.py
index 9834ba5e..7aa8777c 100644
--- a/djangorestframework/renderers.py
+++ b/djangorestframework/renderers.py
@@ -181,7 +181,7 @@ class DocumentingTemplateRenderer(BaseRenderer):
# Get the form instance if we have one bound to the input
form_instance = None
- if method == view.method.lower():
+ if method == getattr(view, 'method', view.request.method).lower():
form_instance = getattr(view, 'bound_form_instance', None)
if not form_instance and hasattr(view, 'get_bound_form'):