def METHOD_NAME(req):
    name = req.GET.get('q','')
    tags = Tag.objects.filter(text__icontains=name)[:8]
    response = HttpResponse(''.join([t.text+'\n' for t in tags]), content_type='text/plain')
    return response