# Add Flag to turn on/off the default alphabet sort order in Admin Django nav bar

**URL:** <https://forum.djangoproject.com/t/add-flag-to-turn-on-off-the-default-alphabet-sort-order-in-admin-django-nav-bar/21225>\
**Category:** The Admin\
**Created:** [May 29, 2023, 6:47am UTC](https://forum.djangoproject.com/t/add-flag-to-turn-on-off-the-default-alphabet-sort-order-in-admin-django-nav-bar/21225 "2023-05-29T06:47:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![htobenothing](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/htobenothing/32/13926_2.png) [@htobenothing](https://forum.djangoproject.com/u/htobenothing)\
**Post date:** [May 29, 2023, 6:47am UTC](https://forum.djangoproject.com/t/add-flag-to-turn-on-off-the-default-alphabet-sort-order-in-admin-django-nav-bar/21225/1 "2023-05-29T06:47:01Z")

</div>

for now the Django module will default sort the module in alphabet order, and show in the admin portal navigation bar.  
Eg: Module A, Module B, Module C. will by sort to A, B, C.  
there are some ways to change the order, eg trick the verbose\_name of module, to manipulate the order, but it is not straight forward, and difficult to maintain.

I check the code, it is happen in get\_app\_list function, which by default sort by model name.  
so thinking can we have a bool flag in setting file eg: MENU\_ALPHABET\_ORDER.

 ![Screenshot 2023-05-29 at 2.39.03 PM](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/2X/7/711dec273cfa957611f5960cc8f2d2b3e716d987.png)  
if it is True, will be same behaviour as before.  
if it is False, the order will be based on the order when it registered to the admin. (the dict is default ordered since python3.6), so can just change the register sequence, will help to sort the menu accordingly.

Just an idea, not sure whether a good solution

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [May 29, 2023, 11:29am UTC](https://forum.djangoproject.com/t/add-flag-to-turn-on-off-the-default-alphabet-sort-order-in-admin-django-nav-bar/21225/2 "2023-05-29T11:29:02Z")

</div>

You can override [this method in your `AdminSite` class](https://docs.djangoproject.com/en/4.2/ref/contrib/admin/#django.contrib.admin.AdminSite.get_app_list) to implement this any way you’d like. That method exists as a published API so you would be able to rely upon it, subject to the normal Django deprecation policy.

You might also be interested in an earlier discussion on this topic - see [Reordering list of models in Django Admin](https://forum.djangoproject.com/t/reordering-list-of-models-in-django-admin/5300)
