Re: Ordering in complex queries

2011-02-23 Thread Tom Evans
On Wed, Feb 23, 2011 at 4:23 PM, Akshit Khurana wrote: > I want to search from database and return objects in order (soft_name, > category and subcategory are fields of a model) >             1st if soft_name has query >             then if category has query >             and then if subcategory

Ordering in complex queries

2011-02-23 Thread Akshit Khurana
I want to search from database and return objects in order (soft_name, category and subcategory are fields of a model) 1st if soft_name has query then if category has query and then if subcategory has query I've written this: query = request.GET.get('q','') if