This is explained in the Django documentation for models.
https://docs.djangoproject.com/en/dev/topics/db/models/
Give metadata to your model using the inner Meta class, for example:
Class Employee (models.Model): .... class Meta: ordering = ["attribute-X"]
Another useful option can be used in the Meta class - verbose_name.
James wu
source share