Skip to content

Instantly share code, notes, and snippets.

@rubinhozzz
Last active March 5, 2019 15:40
Show Gist options
  • Save rubinhozzz/1047a933c99851600ca54e9ac116a0e5 to your computer and use it in GitHub Desktop.
Save rubinhozzz/1047a933c99851600ca54e9ac116a0e5 to your computer and use it in GitHub Desktop.
Form html structure when searching
{% load widget_tweaks %}
<form class="form-inline">
{% for field in form.visible_fields %}
{% render_field field class='form-control mb-2 mr-sm-2' placeholder=field.label %}
{% endfor %}
<button type="submit" class="btn btn-primary mb-2">{% trans 'Search' %}</button>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment