Follow this for sorting queryset:
https://stackoverflow.com/questions/2412770/good-ways-to-sort-a-queryset-django
https://stackoverflow.com/questions/2412770/good-ways-to-sort-a-queryset-django
On Sun, Aug 25, 2019 at 1:51 PM Abu Yusuf <yusuf@binate-solutions.com> wrote:
just sort it like this:
li = ['the', 'thea', 'thecba', 'thecab', 'thebca', 'theabc']
li.sort()
['the', 'thea', 'theabc', 'thebca', 'thecab', 'thecba']On Sun, Aug 25, 2019 at 12:57 PM Soumen Khatua <soumenkhatua258@gmail.com> wrote:Hi Folks,--I already implemented serach query parameter in my Django Rest API app,But I anto to show something like exact query parameter should be appear first then all the should be on the sequence of character like:?search=thethetheatheabcthebacthebcathecabthecbaThank you in advanceRegards,Soumen
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPUw6WbHtrjrEM8WoQ%3D-KZKcuv5YynkbFv358ZZrQLTcP9pCKQ%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACNsr290SvhFkGNFCAre479f9c1mfd6bj%2BU6P8%2B3DBt3AtG50w%40mail.gmail.com.
No comments:
Post a Comment