**filters is python for expand the dict 'filters' into keyword arguments. ie filters={'foo':1} model.objects.filter(**filters)
is the same as model.objects.filter(foo=1) The filters variable is just temporary dictionary for building the keyword arguments from the form data, electing to omit any empty values (no point for a search), and then expanding that temp dictionary into the keyword search arguments needed for the filter() method. The names on the form correspond to the lookup names you'd use for the query. If you use that form to search for first name 'raj', the filters dictionary should end up looking like: {'first_name__istartswith':'raj'} which would expand (**) to the equivalent of User.objects.filter(first_name__istartswith='raj') On Jul 2, 11:53 am, raj <nano.ri...@gmail.com> wrote: > Just a quick question, the **filters thing u placed, i would put > something like first_name last_name or something right? -- 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.