On Sat, 2009-08-01 at 19:59 +0000, Faheem Mitha wrote:
> Hi Malcolm,
> 
> Thanks for the helpful reply.
> 
> On Sat, 01 Aug 2009 12:24:29 +1000, Malcolm Tredinnick
> <malc...@pointy-stick.com> wrote:
> 
> > On Fri, 2009-07-31 at 11:42 -0400, Faheem Mitha wrote:

[...]
> >> 3) Get the sessionid. I had to change request.COOKIES['sessionid']
> >> to request.COOKIES[settings.SESSION_COOKIE_NAME]
> 
> > The default value of settings.SESSION_COOKIE_NAME has always (and
> > remains) "sessionid". However, it's a little more portable to use
> > the latter form (request.COOKIES[settings.SESSION_COOKIE_NAME) in
> > your applications, since then they are usable no matter what the
> > setting happens to be. A Django application writer is not
> > necessarily in control of the settings that will be used when the
> > application is installed.
> 
> To summarize, I've changed settings.SESSION_COOKIE_NAME from their
> default value, so this breaks request.COOKIES['sessionid'], and in
> this case, using request.COOKIES[settings.SESSION_COOKIE_NAME) is
> preferable, because it will work no matter what the value of
> settings.SESSION_COOKIE_NAME happens to be. Is that a correct summary?

Correct.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to