Should be able to set cookies from the request as well as the response.
The arguments are laid out quite well in a blog post by David Cramer. In short, one is never sure where in the request-response cycle the need to send a cookie to the browser will arise. It's therefore best, as it's done in many other web frameworks and technologies, to give the developer the ability to do that throughout the view.
David's example code from that blog post, and his subsequently released django-cookies project no longer work as of Django 1.2. I've taken a slightly different approach in my version of his idea, but it still requires a custom middleware to be installed.
I believe this should be a core function of Django. If you agree, please take a look at my patch. I've included tests and docs. Any feedback at all is most welcome.
Change History
(5)
Has patch: |
set
|
Owner: |
changed from nobody to Paul McLanahan
|
Status: |
new → assigned
|
Triage Stage: |
Unreviewed → Design decision needed
|
Resolution: |
→ wontfix
|
Status: |
assigned → closed
|
Marking won't fix on the base of: http://groups.google.com/group/django-developers/browse_frm/thread/e8aaa5565fb7a555/ca216a753f1e0c75