How to hide column if userwants to hide it, Django Admin
I want to hide one column and make the column visdible but if user want the user view the column, i tried this way but did not worked forr me.
admin.py
class ProductAdmin(
TimestampedModelAdminMixin, ConfigurableColumnsMixin, admin.ModelAdmin):
list_display = [
"id",
"comment",
"active",
]
I tried with this way
def get_form(self, request, obj=None, **kwargs):
form = super(ProductAdmin, self).get_form(request, obj, **kwargs)
del form.base_fields["comment"]
return form