def search(request):
    """
    Display search results.
    """
    if not request.GET in 'q':
        raise Http404
    q = request.GET['q']
    return render(request, 'articles/search.html', {
        'title': 'Search Results for "%s"' % q,
        'articles': Article.apply_filter(request, Q(title__icontains=q) | Q(body__icontains=q)).select_related('author', 'author__profile', 'category'),
    })
dataset/ETHPy150Open 2buntu/2buntu-blog/twobuntu/articles/views.py/search/swapped operands of `in`