Re: Related Field has invalid lookup: icontains

2007-07-23 Thread l5x
Okay. It works! The missing part in my code was: Q(author__username__icontains=phrase). I couldn't find it. Thank you for your help. @Tim: I will remember to debug it that way in the future. Thanks. --~--~-~--~~~---~--~~ You received this message because you are

Re: Related Field has invalid lookup: icontains

2007-07-23 Thread Tim Chase
> news = News.objects.filter( > Q(title__icontains=phrase) > | Q(tags__icontains=phrase) > | Q(short__icontains=phrase) > | Q(content__icontains=phrase) > | Q(author__icontains=phrase) > | Q(source__icontains=phrase) > ) > > Does anybody know what can I do to fix that ? A couple i

Re: Related Field has invalid lookup: icontains

2007-07-23 Thread Nis Jørgensen
l5x skrev: > Hello, > > I have code for searching: > > news = News.objects.filter( > Q(title__icontains=phrase) > | Q(tags__icontains=phrase) > | Q(short__icontains=phrase) > | Q(content__icontains=phrase) > | Q(author__icontains=phrase) > | Q(source__icontains=phrase) > ) > News m