[Django]-Customize form brought from Django forms.py

5👍

css:

<style type="text/css">
label{
    margin-right: 5em; /* or larger if you need */
}
</style>

django template html file:

{% for field in form %}
<p>{{ field.label_tag }} {{ field }}</p>
{% endfor %}

from Customizing the form template

Leave a comment