diff options
| author | Tom Christie | 2014-11-07 15:22:17 +0000 | 
|---|---|---|
| committer | Tom Christie | 2014-11-07 15:22:17 +0000 | 
| commit | 02844a1507285b7146dede5023b784fe63678cf7 (patch) | |
| tree | c5f31bd8809648756aef39683cfc4c041e664f6d /rest_framework/templates | |
| parent | 4e2627736f3cc3814c08dd7132cbd5efa63c2670 (diff) | |
| download | django-rest-framework-02844a1507285b7146dede5023b784fe63678cf7.tar.bz2 | |
Fix up fieldset templates. Closes #2039
Diffstat (limited to 'rest_framework/templates')
3 files changed, 9 insertions, 3 deletions
| diff --git a/rest_framework/templates/rest_framework/horizontal/fieldset.html b/rest_framework/templates/rest_framework/horizontal/fieldset.html index f6d5dd9d..ba3e3aba 100644 --- a/rest_framework/templates/rest_framework/horizontal/fieldset.html +++ b/rest_framework/templates/rest_framework/horizontal/fieldset.html @@ -6,6 +6,8 @@          </div>      {% endif %}      {% for nested_field in field %} -        {% render_field nested_field template_pack=template_pack renderer=renderer %} +        {% if not nested_field.read_only %} +            {% render_field nested_field style=style %} +        {% endif %}      {% endfor %}  </fieldset> diff --git a/rest_framework/templates/rest_framework/inline/fieldset.html b/rest_framework/templates/rest_framework/inline/fieldset.html index 5ee182a5..e49b42fd 100644 --- a/rest_framework/templates/rest_framework/inline/fieldset.html +++ b/rest_framework/templates/rest_framework/inline/fieldset.html @@ -1,4 +1,6 @@  {% load rest_framework %}  {% for nested_field in field %} -    {% render_field nested_field template_pack=template_pack renderer=renderer %} +    {% if not nested_field.read_only %} +        {% render_field nested_field style=style %} +    {% endif %}  {% endfor %} diff --git a/rest_framework/templates/rest_framework/vertical/fieldset.html b/rest_framework/templates/rest_framework/vertical/fieldset.html index 824e6098..3eb5191c 100644 --- a/rest_framework/templates/rest_framework/vertical/fieldset.html +++ b/rest_framework/templates/rest_framework/vertical/fieldset.html @@ -2,6 +2,8 @@  <fieldset>      {% if field.label %}<legend {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</legend>{% endif %}      {% for nested_field in field %} -        {% render_field nested_field template_pack=template_pack renderer=renderer %} +        {% if not nested_field.read_only %} +            {% render_field nested_field style=style %} +        {% endif %}      {% endfor %}  </fieldset> | 
