python 3.x - Django Admin, how to replace the user status sign -
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
Post a Comment