Search code examples
pythondjangoverbose

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


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!


Solution

  • 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