Hi, Searching is the main function of my website and so I want sort/filter functionality to be as efficient as possible since it will be used quite often. I have yet to implement the search portion because I am not quite sure the best way to send and process data. Here are my two ideas:
1) Server processes query and compiles results into dictionary, which is saved in request.session['search_results']. The results are sent as a dictionary into render_to_response and the template engine takes care of outputting the data. For sorting and filtering, a request is sent with the appropriate flag to sort or filter and the server sorts/ filters using python functions (such as sorted()). Sorting and filtering would be done using ajax. 2) Server process query and compiles results into dictionary. The dictionary is passed into render_to_response as a JSON string using simplejson. Template engine just places the search results onto the page as a string. Using javascript (probably jQuery), the search results are presented. For sorting and filtering, javascript just uses the passed JSON and all sorting/filtering is done client-side. If you guys have any suggestions/comments I'd love to hear them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---