mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 10:03:57 +03:00
Fix failing test.
This commit is contained in:
parent
59a0bc55af
commit
ef0bf1e775
|
@ -234,7 +234,8 @@ class DocumentingTemplateRenderer(BaseRenderer):
|
||||||
In the absence on of the Resource having an associated form then
|
In the absence on of the Resource having an associated form then
|
||||||
provide a form that can be used to submit arbitrary content.
|
provide a form that can be used to submit arbitrary content.
|
||||||
"""
|
"""
|
||||||
|
if not hasattr(self.view, 'get_serializer'): # No serializer, no form.
|
||||||
|
return
|
||||||
# We need to map our Fields to Django's Fields.
|
# We need to map our Fields to Django's Fields.
|
||||||
field_mapping = dict([
|
field_mapping = dict([
|
||||||
[FloatField.__name__, forms.FloatField],
|
[FloatField.__name__, forms.FloatField],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user