Rest API

13 views
Skip to first unread message

Soumen Khatua

unread,
Aug 25, 2019, 2:57:40 AM8/25/19
to django...@googlegroups.com
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=the
the
thea
theabc
thebac
thebca
thecab
thecba

Thank you in advance

Regards,
Soumen

Abu Yusuf

unread,
Aug 25, 2019, 3:52:20 AM8/25/19
to django...@googlegroups.com
just sort it like this:

li = ['the', 'thea', 'thecba', 'thecab', 'thebca', 'theabc']
li.sort()
['the', 'thea', 'theabc', 'thebca', 'thecab', 'thecba']

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPUw6WbHtrjrEM8WoQ%3D-KZKcuv5YynkbFv358ZZrQLTcP9pCKQ%40mail.gmail.com.

Abu Yusuf

unread,
Aug 25, 2019, 3:58:23 AM8/25/19
to django...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages