specifically, using the example template in the django-filter docs:
{% extends "base.html" %}
{% block content %}
<form action="" method="get">
{{ filter.form.as_p }}
<input type="submit" />
</form>
{% for obj in filter %}
{{ obj.name }} - ${{ obj.price }}<br />
{% endfor %}
{% endblock %}
Do others know how to get crispy forms to work?
Inserting the following makes the form render nicely, but I can't get it to actually be functional.
{% crispy filter.form %}
figured it out - was too easy. I swear I tried this method several times earlier, although I must have been doing something wrong. Sorry to ask such a simple question.
Answer is to change:
{{ filter.form.as_p }}
To:
{{ filter.form|crispy }}
{% crispy filter.form %}
also works FWIW. Did you figure out a way to use Crispy Form'shelper.layout = Layout(...)
to define the submit button, field widgets, etc from the Python side? – Batholith