python 3.x - Django Admin, how to replace the user status sign -


in django admin, super user column, showing these 2 signs enter image description here

how can replace them text?

you can define model admin method returns text require, include in list_display.

class myuseradmin(useradmin):     def is_superuser_text(self, obj):         return 'true' if obj.is_superuser else 'false'                 is_superuser_text.short_description = 'is superuser'     is_superuser_text.admin_order_field = 'is_superuser'      list_display = ('username', 'first_name', 'email', 'date_joined', 'is_superuser_text',) 

Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -