How to order foreign key values โโin Django admin?
Example:
LeaveBase class (models.Model):
User = models.ForeignKey(User,verbose_name=('User Name'))
FinancialYear=models.ForeignKey(FinancialYear,verbose_name=('Financial Year'))
In my Django admin, when I add a new separation base, the User column shows how the select box with the default order by id, I would like to order its name.
source
share