Column / field permissions on Django admin site?

Is it possible to implement column level permissions for each user on the Django admin site?

This is a small project, and I only need two permission groups.

I cannot find anything out of the box in the documents, but I was wondering if it is possible to create two admin sites and use separate ModelAdmin.exclude or ModelAdmin.fields for each of them? I know this is probably a stretch.

I also tried looking around, but I only found row-level permissions (django-granular permissions).

I know that this can be done quite easily in my own views, while maintaining permissions, but I was wondering if there was a way to use the admin site or if there was another application.

+4
source share
1 answer

One way is to create admin sites and use separate ModelAdmin.exclude or ModelAdmin.fields for each of them.

Instead of dealing with it too much, we create our own viewing functions. They are not complicated.

We use separate forms for each class of users. The viewing functions are almost the same, except for the necessary permissions.

+1
source

All Articles