List Info

Thread: Re: How do you set a cookie without a response? Like this




Re: How do you set a cookie without a response? Like this
user name
2007-12-20 13:20:34
We have finalized our middleware to handle this. (http://
www.davidcramer.net/code/62/set-cookies-without-a-response-i
n-django.html)

I'm not sure all developers point of view on this, but if
there's
enough interest I'll create a ticket/patch for it.

On Dec 13, 3:52 pm, David Cramer <dcra...gmail.com> wrote:
> Upon further discussion -- there may be an easier
solution is just
> overloading the setattr on request.COOKIES and setting
those in a
> response middleware.
>
> On Dec 13, 3:25 pm, David Cramer <dcra...gmail.com> wrote:
>
> > Oh, for the record, authenticate() still won't
work for us, because
> > now we don't have the request object :P
>
> > On Dec 13, 3:22 pm, David Cramer <dcra...gmail.com> wrote:
>
> > > We ran into the problem lately, that we
wanted to integrate our new
> > > authentication services into an
authentication backend. Too bad for us
> > > that we can't set cookies or responses inside
of authenticate().
>
> > > Here's a potential solution that we are
considering implemented. This
> > > is untested code, I just whipped up it real
quick to show the goal:
>
> > >http://www.pastethat.
com/?KXS4u
>
> > > Criticism? 
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django developers" group.
To post to this group, send email to django-developersgooglegroups.com
To unsubscribe from this group, send email to
django-developers-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en

-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )