Hi Raja

This looks great.

Thanks for helping out.

Stepehn

On Jun 29, 9:17 pm, Raja <rajas...@gmail.com> wrote:
> Setup thecookie.domain attribute value to '.mydomain.com' (The first
> dot is important) and all hosts in that domain will get thecookie.
>
> -- Raja
>
> On Jun 29, 4:01 pm, Stephen Cheng <stephenchengm...@gmail.com> wrote:
>
> > Yes, I check thecookievalue in view or in middleware class.
>
> > Just give example, eg, I want the browser to remember online user's
> > city, so next time when they typewww.mydomain.com, it will be
> > diverted to cityx.mydomain.com.
>
> > Now the problem is that:
> >   1. When I setup acookievarible cityname=city5 in
> > city1.mydomain.com (in a view), I expect in my middleware class to
> > redirect to city5.mydomain.com if thesubdomainname is www, but the
> > citynamecookievar is none and the cityanme=city5 exists only in
> >subdomaincity1.mydomain.com
> >   2. I tried to diagnose the problem and found that I have to setup
> > the samecookievar in each of separatesubdomainview, which is not
> > acceptable.
>
> > Hope this clarify things.
>
> > Thanks,
>
> > Stephen
>
> > On Jun 29, 7:36 pm, Raja <rajas...@gmail.com> wrote:
>
> > > Just checking, Are you submitting back to the server before checking
> > > for thecookievalue ?  Cookies are sent only when the request reaches
> > > the server.
>
> > > -- Raja
>
> > > On Jun 29, 9:21 am, Stephen Cheng <stephenchengm...@gmail.com> wrote:
>
> > > > Hi
>
> > > > I am facing a problem in DEV server that I really have no idea how to
> > > > resolve, which is related tocookievariable for subdomains.
>
> > > > I use wildcard subdomains, eg. sub1.abc.com, sub2.abc.com,
> > > > sub3.abc.com and all sub domains point to one running instance of
> > > > django app.
>
> > > > The problem is that I hope the cookievar will be available for all
> > > > subdomains but it seems django doesn't support(correct me if I am
> > > > wrong)
>
> > > > eg, I setup cookieabc="abc" in sub1.abc.com, however cookieabc=None
> > > > when accessing sub1.abc.com in the same view. I tried to enable
> > > > SESSION_COOKIE_DOMAIN, but it doesn't work.
>
> > > > I have no idea how to resolve this. Any idea?
>
> > > > Thanks,
>
> > > > Stephen
--~--~---------~--~----~------------~-------~--~----~
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