Skip to content

Commit

Permalink
Add fallback for uncrispified forms where form.attrs were not set
Browse files Browse the repository at this point in the history
It is not necessarily a complete and/or appropriate fallback for forms that are originally non-crispy. This is in ulikely unforeseen cases where for some reason Django widget can not be rendered as a foundation-5/field.html template without loosing some field data.
To sum it up: it should be generic enough for forms that are originally non-crispy but it is not a given. So if this template is to be reused by non-crispy forms (in contrast to uncrispified forms), the rendering of forms should be properly tested.
  • Loading branch information
podliashanyk committed Nov 4, 2024
1 parent 02e432c commit 1ecddf3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@
{% endif %}
{% endblock form_fields %}
{% else %}
{{ form }}
{% for field in form %}
{% show_field field %}
{% endfor %}
{% endif %}

0 comments on commit 1ecddf3

Please sign in to comment.