diefenbach/django-lfs — pull request #20 by naro (2012-06-27 13:11:07+00:00)
Title: Sorting fixes

My commits at Jun 03, 2012, Jun 20, 2012 and Jun 21, 2012 were just quick fixes for sorting problem which appeared on my shop, because I'm using lfs_solr. The commit a35c3c4 supersedes the previous commits.

The actual problem is, SOLR needs different value for sorting so if your 'sorting' session variable contains '-price' as sorting key, Solr search fails. On the other site, if the 'sorting' variable contains 'price asc' (for SOLR) the Django product sort fails. I implemented simple SORTING_MAP setting variable which contains both common and fulltext sorting keys. The sorting.html template (lfs_theme) is generated based on the SORTING_MAP variable.

This pull request requires merge of all lfs, lfs_theme and lfs_solr packages. No functional change expected, just a bugfix for using SOLR.