Re: set_test_cookie() on every page?

2011-09-30 Thread Victor Hooi
uot;current_conference") return HttpResponse('Set current_conference to ' + str(request.POST.get("current_conference"))) So it seems I would need to put the set_test_cookie() logic on every page, since they could make this call from any page with the dropdown. Or is there ano

Re: set_test_cookie() on every page?

2011-09-30 Thread John
While this is not directly your question, if you want to do something on literally every view, the easiest way to do it would most likely be to add a custom middleware with a process_request or process_response method. More to the point, you should not call set_test_cookie on every view - in the

set_test_cookie() on every page?

2011-09-29 Thread Victor Hooi
Hi, I've read the Django docs on setting test cookies (https://docs.djangoproject.com/en/dev/topics/http/sessions/#setting-test-cookies), and I'm still a bit confused. One of our views sets a session variable to remember the object a user is currently viewing (we figured it wasn't worth