aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Christie2014-11-18 15:38:31 +0000
committerTom Christie2014-11-18 15:38:31 +0000
commit080bd3d24e1866df2acc3aae0ec0f97ebe3a8c36 (patch)
treebf03e2dcb23c2e4f372ff00cba4a810a96c24681
parent084354d3ebf3949f8c1664d68da4a568da0b10fa (diff)
downloaddjango-rest-framework-080bd3d24e1866df2acc3aae0ec0f97ebe3a8c36.tar.bz2
Add comment ref #2089
-rw-r--r--rest_framework/renderers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/rest_framework/renderers.py b/rest_framework/renderers.py
index 7c2b5156..6596fc44 100644
--- a/rest_framework/renderers.py
+++ b/rest_framework/renderers.py
@@ -515,6 +515,7 @@ class BrowsableAPIRenderer(BaseRenderer):
In the absence of the View having an associated form then return None.
"""
+ # See issue #2089 for refactoring this.
serializer = getattr(data, 'serializer', None)
if serializer and not getattr(serializer, 'many', False):
instance = getattr(serializer, 'instance', None)
@@ -562,6 +563,7 @@ class BrowsableAPIRenderer(BaseRenderer):
via standard HTML forms.
(Which are typically application/x-www-form-urlencoded)
"""
+ # See issue #2089 for refactoring this.
serializer = getattr(data, 'serializer', None)
if serializer and not getattr(serializer, 'many', False):
instance = getattr(serializer, 'instance', None)