it is ok now, due to aligning of return render_to_response("groups/
search.html", {
On 1月19日, 下午4时28分, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> all code came from here:http://djangobook.com/en/1.0/chapter07/
>
> in my view:
> def search(request):
> query = request.GET.get('q', '')
> if query:
> qset = (
> Q(title__icontains=query) |
> Q(forum__title__icontains=query) |
> Q(color__icontains=query)
> )
> results = Thread.objects.filter(qset).distinct()
> else:
> results = []
>
> return render_to_response("groups/search.html", {
> "results": results,
> "query": query
> })
>
> when running, got this error:
> ValueError at /groups/search/
> The view groups.views.search didn't return an HttpResponse object.
>
> thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---