5👍
✅
I think the easiest and cleanest way is to stick to the methods outlined in the docs…
<form>
<div class="column-1">
{{ form.field1 }}
...
{{ form.field5 }}
</div>
<div class="column-2">
{{ form.field6 }}
...
{{ form.field9 }}
</div>
</form>
1👍
You can use carljm’s django-form-utils which allows you to define fieldsets. You can specify a class for each fieldset as you like. You’ll still have to list all your fields in the form definition, though.
- [Django]-Limiting the content of TextField in django templates
- [Django]-Use values() in Django query to get Model instead of ID
Source:stackexchange.com