Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

creating custom permissions in django

class USCitizen(models.Model):
    # ...
    class Meta:
        permissions = (
            ("can_drive", "Can drive"),
            ("can_vote", "Can vote in elections"),
            ("can_drink", "Can drink alcohol"),
        )
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #creating #custom #permissions #django
ADD COMMENT
Topic
Name
4+2 =