[Solved]-Order items with the django-admin interface

5πŸ‘

βœ…

Sure, here is an example of admin.py file with up and down links to change items order:
https://github.com/alexvasi/django-simplemenu/blob/master/simplemenu/admin.py

Basically, you just need to override get_urls method to add your custom views (move_up and move_down in this example).

More famous example would be django-treemenus, but there is some extra code to support older versions of django.

πŸ‘€alex vasi

12πŸ‘

Check this: django-orderedmodel.

This is a really simple implementation of abstract base class for items which can be ordered with admin interface. No external dependencies and easy to use.

πŸ‘€kirelagin

2πŸ‘

You can use django-admin-sortable2 to easily change the order of items including inline items as well.

0πŸ‘

0πŸ‘

In case someone else is seeking the solution for that issue in 2017, I found the great package Django Admin Sortable

πŸ‘€Sergei V Kim

Leave a comment