Re: Modify Session in TemplateTag?

2007-07-05 Thread rtconner

Gah dumb groups thinking I was quoting something...

del context['request'].session['some key']
sess = SessionMiddleware()
http = HttpResponse()
sess.process_response(context['request'], http)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~--~~~~--~~--~--~---



Modify Session in TemplateTag?

2007-07-05 Thread rtconner

So I realize I'm doing something non-standard here, but still I have
my reasons, and if I can pull this off, it'll make life easier for me
in the future.

.. is it possible to save to the Session within a TemplateTag? I don't
really see how it is, but I'm hoping someone knows something that I
don't.

For fun I hacked this together, which *almost* works. For some reason
it does not immediately modify the session, it waits one page load
before making my changes.

(in Node.render)
>del context['request'].session['some key']
>sess = SessionMiddleware()
>http = HttpResponse()
>sess.process_response(context['request'], http)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~--~~~~--~~--~--~---