How to add verbose name after a field in Admin - Django

675 views Asked by At

I have inserted a verbose name for a field in my models (Boolean Field) and when displaying in the admin, the checkbox is shown before the verbose name.

How can I do so that the checkbox shows after the verbose name in the admin console?!

Or is there another way of assigning a specific label to a field other than the fieldname so that it shows correctly in the admin?

Thanks!

2

There are 2 answers

0
Prashant Gaur On BEST ANSWER

you just need to go to.

/admin/templates/admin/includes/fieldset.html

template. Here you can see source code like.

         {% if field.is_checkbox %}
                        {{ field.field }} {{ field.label_tag }}

Just change code to :

      {% if field.is_checkbox %}
                         {{ field.label_tag }} {{ field.field }}

We put field.label_tag before field.field

0
Aks On

This is the way django shows Boolean fields in Admin, whether u give verbose name or not. If you really bother about it, So you can override Django admin templates. click here for more detail...