Reputation: 916
I have a long variable name in one of my models "xxxx_xxxx_xx_xxxxxxxx" is there an equivilent of:
xxxx_xxxx_xx_xxxxxxxx.short_description = 'xxxx'
for variables or do I have to make a method to display that? I would like to not have to use a method because I want to be able to sort by this variable in the Django admin. Thanks.
Upvotes: 0
Views: 966
Reputation: 17713
Look at the verbose field name option. It allows you use whatever name you like in the admin. There is also the verbose_name_plural for model names that have unusual plural construxions.
Upvotes: 2