There is a bug in django which leads to getting the same cache output
for different subdomains (but same PATH) - eg. pl.example.com/test/
and en.example.com/test/ . I've filled in BUG here:

http://code.djangoproject.com/ticket/15978

As aaugustin wrote, there are two ways of implementing:
- request.get_host():
  + simple, one line
  - we get different cache for www. and w/o www. prefix
- using sites framework:
  + more django way - we are using contrib!
  + one line
  + we don't need to install sites framework - fallback to
RequestSite: 
http://docs.djangoproject.com/en/dev/ref/contrib/sites/?from=olddocs#requestsite-objects

Next thing to consider if such modification doesn't introduce any
nasty side-effects?

PS: For now I'm closer to second solution, and according to
documentation something like:
Site.objects.get_current().domain
will always get the domain even when we do not have sites installed.

Second solution weren't tested by me it's purely theoretical. Waiting
for comments!

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to