[Answered ]-'WSGIRequest' object has no attribute 'update'

1👍

return render_to_response('search.html', dictionary, request)

You’re passing the request as a context instance, while you should pass an instance of django.template.Context (though you probably want to use its subclass RequestContext).

👤knbk

1👍

You’ve correctly used the new render shortcut in the last line. In the line before the else clause, though, you’ve used the older render_to_response and passed request as the last parameter. You should use render there too, with request as the first param:

return render(request, 'search.html', dictionary)

Leave a comment