Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#2029 closed (fixed)

[patch] Fix sorting models by verbose_name_plural in get_admin_app_list template tag

Reported by: Alex Dedul Owned by: Adrian Holovaty
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Now it sorts models just by doing model_list.sort() and it don't work when you have custom verbose_name_plural set in your model, for example in UserProfile model verbose_name_plural set to 'address book'. Patch below fixes this to correctly sort based on verbose_name_plural.

Attachments (2)

admin_model_list_sort_by_name.patch (1007 bytes) - added by Alex Dedul 13 years ago.
admin_model_list_sort_by_name_fixed_typo.patch (1009 bytes) - added by Alex Dedul 13 years ago.
Fixed typo in comments

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by Alex Dedul

Changed 13 years ago by Alex Dedul

Fixed typo in comments

comment:1 Changed 13 years ago by Luke Plant

Resolution: fixed
Status: newclosed

(In [2999]) Fixed #2029 - models now sorted by verbose_name_plural in get_admin_app_list - thanks Alex Dedul.

comment:2 Changed 13 years ago by Here

Type: defect
Note: See TracTickets for help on using tickets.
Back to Top