Suppose I have a form:
class MyForm(forms.Form):
    ...
and then in a view I construct it:
...
form = MyForm()
...
I would like to add a CSS class to the entire form, so that I can render it as something like this:
<form class="{{ form.CLASS }}" method="post">{% csrf_token %}
    {{ form }}
    <input type="submit" value="Submit" />
</form>
What is the proper way to achieve that (other than define a field "class")?
 
     
    