Re: Implementing a User Search Feature

2011-07-02 Thread Andre Terra
You can use Alex Gaynor's great app called django-filter available at https://github.com/alex/django-filter It's the best app for the job, hands down. Sincerely, André Terra On 7/2/11, raj wrote: > Thanks, when I get back to my production comp, ill give this a try. > Did know about this query

Re: Implementing a User Search Feature

2011-07-02 Thread Doug Ballance
**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

Re: Implementing a User Search Feature

2011-07-02 Thread raj
Thanks, when I get back to my production comp, ill give this a try. Did know about this queryset thing. Thanks again. Just a quick question, the **filters thing u placed, i would put something like first_name last_name or something right? On Jun 30, 11:25 pm, Doug Ballance wrote: > If you just wa

Re: Implementing a User Search Feature

2011-06-30 Thread Doug Ballance
If you just want a simple user search (which seems to be what you are asking for), it really depends on your models - but a basic approach I usually use is to define a django form to use for the search, and instead of defining a save method, make a method that returns a queryset. As an off the top

Re: Implementing a User Search Feature

2011-06-30 Thread Stuart MacKay
bruno, The OP specifically asked about searching through a site. While there was not enough information in the question to determine the scope I think it was reasonable to conclude that since raj was unable to easily find the answer using google that he was probably not asking about something

Re: Implementing a User Search Feature

2011-06-30 Thread bruno desthuilliers
On Jun 30, 9:02 pm, Stuart MacKay wrote: > The canonical answer for search in django is probably > solr,http://lucene.apache.org/solr/This probably covers all your search needs. > > haystack,http://haystacksearch.org/should provide an easy to use API > Yes, I think solr is really what the OP nee

Re: Implementing a User Search Feature

2011-06-30 Thread bruno desthuilliers
On Jun 30, 8:23 pm, raj wrote: > Tried googling but couldn't come up with much. > How do I implement a User Search feature? https://docs.djangoproject.com/en/1.3/ref/models/querysets/#filter Anything else ? -- You received this message because you are subscribed to the Google Groups "Django u

Re: Implementing a User Search Feature

2011-06-30 Thread Stuart MacKay
The canonical answer for search in django is probably solr, http://lucene.apache.org/solr/ This probably covers all your search needs. haystack, http://haystacksearch.org/ should provide an easy to use API Stuart Mackay Lisbon, Portugal > Tried googling but couldn't come up with much. > How do I

Re: Implementing a User Search Feature

2011-06-30 Thread Shawn Milochik
On 06/30/2011 02:23 PM, raj wrote: Tried googling but couldn't come up with much. How do I implement a User Search feature? Where an individual can type in the first and/or last name of user and come up with results? I saw some things about how to search through a site, but I think this is a litt

Implementing a User Search Feature

2011-06-30 Thread raj
Tried googling but couldn't come up with much. How do I implement a User Search feature? Where an individual can type in the first and/or last name of user and come up with results? I saw some things about how to search through a site, but I think this is a little different. Thank you. -- You rec