2π
I usually write out the html for each of my form elements, so I have a little more control over each one. Then you can add an * for required or REQUIRED!!.
<p><label>Title: *<br />
{% if form.title.errors %}<ul class="errorlist">{{ form.title.errors }}</ul>{% endif %}
{{form.title}}
</label></p>
<p><label>Category:<br />
{% if form.category.errors %}<ul class="errorlist">{{ form.category.errors }}</ul>{% endif %}
{{form.category}}
</label></p>
π€Joe
- [Django]-ImproperlyConfiguredError about app_name when using namespace in include()
- [Django]-Django Many-to-Many (m2m) Relation to same model
- [Django]-Can I have a Django model that has a foreign key reference to itself?
Source:stackexchange.com