Code

Opened 8 years ago

Closed 8 years ago

Last modified 8 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
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: UI/UX:

Description

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 8 years ago.
admin_model_list_sort_by_name_fixed_typo.patch (1009 bytes) - added by Alex Dedul 8 years ago.
Fixed typo in comments

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Alex Dedul

Changed 8 years ago by Alex Dedul

Fixed typo in comments

comment:1 Changed 8 years ago by lukeplant

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:2 Changed 8 years ago by Here

  • Type defect deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.