Search django-taggit tags

Viewed 785

I need help adding in the django-taggit tags to my search function. I'm currently using the search function that I found on here (Search page on the django). Is there any way to incorporate taggit into this? Or am I better off using a package like Haystack? This is for a simple internal web app for my company, ~ 3-4 light users.

EDIT

Trying to make this a more directed question, rather than opinion based. Below is the search function I'm currently using. How do I incorporate the django-taggit tables, taggit_tag (where the word is stored) and taggit_taggeditem (where the relationship to the main model is stored) to pull those records and then combine them entry_query while only keeping unique PKs?

def search(request):
found_entries = None
if ('q' in request.GET) and request.GET['q'].strip():
    # query_string is a separate function that simple cleans the search string that is passed in by the user
    query_string = request.GET['q']
    entry_query = get_query(query_string, ['company_name', 'stock_symbol', 'address'])
    found_entries = Company.objects.filter(entry_query).order_by('company_name')\
        .annotate(num_transcripts=Count('transcripts'))

return render_to_response('company_list.html', {'all_companies': found_entries})
1 Answers
Related