2👍
formfield_for_foreignkey
only overrides the drop down menu.
What you probably want is to order in the model’s Meta
:
class TestSoftware(models.Model):
class Meta:
ordering = ['name']
Source:stackexchange.com
2👍
formfield_for_foreignkey
only overrides the drop down menu.
What you probably want is to order in the model’s Meta
:
class TestSoftware(models.Model):
class Meta:
ordering = ['name']