I want to know what this class is and how it works in Django.
class Categorias(models.Model):
...
class Meta:
...
I want to know what this class is and how it works in Django.
class Categorias(models.Model):
...
class Meta:
...
Classes
Meta
inside Django models are used to attach metadata to those models. For example:They are used for many things, such as defining the enabled permissions, the associated database, the name of the table, the singular or plural name that will be seen in the Django admin.
To see more about it you can go to: official Django documentation
It is worth clarifying that they should not be confused with those
metaclass
of Python: official python documentation