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

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -