I have the CRUD views, one of them looks like this:
#model
class Model(models.Model):
field1 = models.CharField()
field2 = models.CharField()
#view
class Model1CreateView(CreateView):
model = Model1
fields = ['field1', 'field2']
#template
and model1_form.html
<form action="{% url 'model1_new' %}" method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Submit" />
</form>
I need to specify a css class for field1, how can I do that?
Widgetinstances for a givenForm, while it's (arguably) more logical to put that in templates.