Extra permissions to enter into the permissions table when creating a model. Add, change, delete, and view permissions are automatically created for each model. This has to be a tuple like (permission_code
, human_readable_permission_name
)
if proxy=True
, this model is a proxy model. I will write about a proxy model later.
List of constratins you want to define on the model. like an age limit.
from django.db import models
class Customer(models.Model):
age = models.IntegerField()
class Meta:
constraints = [
models.CheckConstraint(check=models.Q(age__gte=18), name='age_gte_18'),
]
I will write about constraints in a later post as well.