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
> 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
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
3 matches
Mail list logo