In my admin.py I filter by ‘active’ and ‘country’ this is done using the following line of code within my SomethingAdmin class….
list_filter = ['active', 'countryid']
As you can see countryid is not pretty when displayed in my admin list view, how can I change this to a more friendly name, say just ‘Country’?
Thanks.
Update:
Below seems to work:
incentiveid = models.ForeignKey(Incentive,verbose_name="Incentive",
null=True, db_column='incentiveID', blank=True)
As Aamir says, if you define labels on your fields in your model, you should see the more attractive filter options:
assuming that
Countryis name of anotherModel– this should show up in theAdminfilter view.