Skip to content

mixins

OwnableMixin

Source code in users/mixins.py
4
5
6
7
8
9
class OwnableMixin:
    def can_edit(self, user: User):
        return user.is_superuser

    def can_view(self, user: User):
        return user.is_superuser

can_edit(user)

Source code in users/mixins.py
5
6
def can_edit(self, user: User):
    return user.is_superuser

can_view(user)

Source code in users/mixins.py
8
9
def can_view(self, user: User):
    return user.is_superuser