File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
rest_framework/templates/rest_framework Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 6
6
{% endif %}
7
7
8
8
< div class ="col-sm-10 ">
9
- < input name ="{{ field.name }} " {% if style.input_type ! = "file " %}class ="form-control "{% endif %} type ="{{ style.input_type }} " {% if style.placeholder %}placeholder ="{{ style.placeholder }} "{% endif %} {% if field.value %}value ="{{ field.value }} "{% endif %} {% if style.autofocus and style.input_type ! = "hidden " %}autofocus{% endif %} >
9
+ < input name ="{{ field.name }} " {% if style.input_type ! = "file " %}class ="form-control "{% endif %} type ="{{ style.input_type }} " {% if style.placeholder %}placeholder ="{{ style.placeholder }} "{% endif %} {% if field.value is not None %}value ="{{ field.value }} "{% endif %} {% if style.autofocus and style.input_type ! = "hidden " %}autofocus{% endif %} >
10
10
11
11
{% if field.errors %}
12
12
{% for error in field.errors %}
Original file line number Diff line number Diff line change 5
5
</ label >
6
6
{% endif %}
7
7
8
- < input name ="{{ field.name }} " {% if style.input_type ! = "file " %}class ="form-control "{% endif %} type ="{{ style.input_type }} " {% if style.placeholder %}placeholder ="{{ style.placeholder }} "{% endif %} {% if field.value %}value ="{{ field.value }} "{% endif %} {% if style.autofocus and style.input_type ! = "hidden " %}autofocus{% endif %} >
8
+ < input name ="{{ field.name }} " {% if style.input_type ! = "file " %}class ="form-control "{% endif %} type ="{{ style.input_type }} " {% if style.placeholder %}placeholder ="{{ style.placeholder }} "{% endif %} {% if field.value is not None %}value ="{{ field.value }} "{% endif %} {% if style.autofocus and style.input_type ! = "hidden " %}autofocus{% endif %} >
9
9
</ div >
Original file line number Diff line number Diff line change 3
3
< label {% if style.hide_label %}class ="sr-only "{% endif %} > {{ field.label }}</ label >
4
4
{% endif %}
5
5
6
- < input name ="{{ field.name }} " {% if style.input_type ! = "file " %}class ="form-control "{% endif %} type ="{{ style.input_type }} " {% if style.placeholder %}placeholder ="{{ style.placeholder }} "{% endif %} {% if field.value %}value ="{{ field.value }} "{% endif %} {% if style.autofocus and style.input_type ! = "hidden " %}autofocus{% endif %} >
6
+ < input name ="{{ field.name }} " {% if style.input_type ! = "file " %}class ="form-control "{% endif %} type ="{{ style.input_type }} " {% if style.placeholder %}placeholder ="{{ style.placeholder }} "{% endif %} {% if field.value is not None %}value ="{{ field.value }} "{% endif %} {% if style.autofocus and style.input_type ! = "hidden " %}autofocus{% endif %} >
7
7
8
8
{% if field.errors %}
9
9
{% for error in field.errors %}
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ class ExampleSerializer(serializers.Serializer):
151
151
'<legend>Nested1</legend>'
152
152
'<divclass="form-group">'
153
153
'<label>Textfield</label>'
154
- '<inputname="nested2.nested1.text_field"class="form-control"type="text">'
154
+ '<inputname="nested2.nested1.text_field"class="form-control"type="text"value="" >'
155
155
'</div>'
156
156
'</fieldset>'
157
157
'<divclass="form-group">'
You can’t perform that action at this time.
0 commit comments