I have the view below and wonder if its possible to add other search
results into the view or would I need to write seperate ones. Ideally,
I'd like to have

firm_search = Activity.objects.filter(firm__firms__icontains=q)
client_search= Activity.objects.filter(clients__client__icontains=q)

Would I just add these to the existing view? Confused? Any suggestion
would be appreciated.

def search_detail(request):
    if 'q' in request.GET:
        q = request.GET['q']
        search_results = Activity.objects.filter
(country__country__icontains=q)
    else:
        q = None
        search_results = None
    return render_to_response('country/search_detail.html',
                {'search_results': search_results, 'query': q})
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to