Meta Options in Django Models
· β 4 min read
Define metadata for a model through an inner class “class Meta”, like this:
1 2 3 4 class Foo(models.Model): bar = models.CharField(max_length=30) class Meta: #...... Model metadata means: any data that is not a field
such as ordering options, admin options, and so on.
Below are all the Meta options you might use.