-1

When showing boolean fields, there's no check/uncheck icon as in the default template of Django Admin. my Admin model

class UserAdmin(UserAdmin):
    list_display = ['username', 'last_name', 'first_name', 'active']
    search_fields = ['username', 'last_name', 'first_name', 'is_active', 'groups']
ketimaBU
  • 901
  • 4
  • 15
  • 35

2 Answers2

1

Thanks to guidance from @ketimaBU i got it working too.

Here's the full solution that worked in my case, using Django==3.0.2 and r-django-jet==2.0.8.

In the project /templates/admin/ folder add a "base.html" file with following content, to override Jet style:

{% extends "admin/base.html" %}

<!-- Show the images for BooleanField -->
{% block extrastyle %}
    <style>
        #changelist-form img {
            display: block; 
        }
    </style>
{% endblock %}
0

To fix, I just had to override a CSS style in style tag, in base.html that I have overridden admin folder, of it:

#changelist-form td.field-active img {
    display: inline-block !important; // we can use also display:block
}
ketimaBU
  • 901
  • 4
  • 15
  • 35