Re: search db & if sequences

2010-01-24 Thread mehdi0016
if requst.GET['table'] in tables: f = fields[requst.GET['field']] matches = tables[requst.GET['table']].objects.filter (f__icontains=requst.GET['query']) thanks, Mehdi. On Jan 24, 9:53 pm, Doug Blank wrote: > On Sun, Jan 24, 2010 at 1:05 PM, mehdi001

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 name