1👍
✅
You can set the ordering and many other options for a model through the use of the meta class. So for your example:
class Address(models.Model):
address = models.CharField(max_length=20)
...
class Meta:
ordering = ['address']
This will order Address models in your queryset after they have been queried from the database. This will have no impact on how the data is underlying stored.
Source:stackexchange.com