jquery - sort search result but keep the result - django -
i stuck in issue:
i have search engine in page. 1 can search , results of more 2 pages. rendering pages paginator. current problem once search , sort result, search result distroyed. after sort, getting different search results.
the architecture this:
normal search:
page/found-items/?state=bla&place=bla sort on page/found-items/?state=bla&place=bla runs jquery.load() function url: /sort/?sortid=bla.
in views.py have 2 functions:
def search(result): #search in db def sort(request): #sort search result, how keep result after sort??? the code long, thats why posted form of functions , urls..
appeciate help
python lists have built-in sort() method modifies list in-place, there sorted() built-in function builds new sorted list iterable.
Comments
Post a Comment