field level permission in django

1.2k views Asked by At

In django, I can use django-guardian for object level permission for user and groups. But what if I want to set field level permission?

Lets say I have a model as below:

class Attribute(models.Model):
    name = models.CharField()
    reg = models.CharField()
    location = models.CharField()

and I have three users in my system and these are user1, user2, and user3

Now I want user1 will get a permission for all three fields of model Attribute. But user2 will get permission to only name and geg and user3 will get permission for only the name field.

In my system there are a lot of users and groups. Is there any way like django-guardian to set field level permissions in django.

0

There are 0 answers