Hot Django admin table header sort reuse?

Can I reuse the table header sort function for admin forms in my own views and templates?

+3
source share
2 answers

Well, not reusing the admin function, but you can use http://github.com/directeur/django-sorting for the same effect. It is ridiculously easy to implement in your own projects.

Use it with http://code.google.com/p/django-pagination/ , although you can either use it independently.

+3
source

django-admin.Sorting . get col , o = 1 & ord = asc. , , . order_by.

0

Source: https://habr.com/ru/post/1758531/


All Articles