Re: search db & if sequences

2010-01-25 Thread fabrixxm
On Jan 24, 11:23 pm, mehdi0016 wrote: > but in my dynamic field searching issue, exact field name used by > filter method. even dictionary of fields not help there. > > tables = {"Author": Author, "Book": Book,} > fields = {"Author":Author().first_name, "Book":Book().title} >

Re: search db & if sequences

2010-01-24 Thread mehdi0016
yes, that helps much. but in my dynamic field searching issue, exact field name used by filter method. even dictionary of fields not help there. tables = {"Author": Author, "Book": Book,} fields = {"Author":Author().first_name, "Book":Book().title} if requst.GET['table'] in tables: f =

Re: search db & if sequences

2010-01-24 Thread Doug Blank
On Sun, Jan 24, 2010 at 1:05 PM, mehdi0016 wrote: > hi > i'm new with python and django and i work on search page of my site. > in my html search form, user can choose table(or field) which want to > search. in server-side i use sequences of 'if' to find chosen table(or >

search db & if sequences

2010-01-24 Thread mehdi0016
hi i'm new with python and django and i work on search page of my site. in my html search form, user can choose table(or field) which want to search. in server-side i use sequences of 'if' to find chosen table(or field) and related django model. ... #here i assume searched fields have the same