mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
Add comment ref #2089
This commit is contained in:
parent
084354d3eb
commit
080bd3d24e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user