I have a Model that’s managed by Django Admin. How to I customize the display of its edit form based on the currently logged in user? For example if someone other than the superuser is modifying the model, I want to hide certain fields.
It’d be great if I could set fields based on request.user
A hackish way to do this is overwriting the
list_displayvariable EVERY time the changelist view is called:But set the variable every time to the desired value, since the same admin instance might be called for requests made by other users as well!