Revision history  [back]

cookie domain-subdomain

Hi all!
I've deployed askbot on subdomain and I have another django application (blogs) that runs on main domain. Both share the same database, so users are registered and logged in only with askbot.
But now I want users that logged in on subdomain will be "logged in" on main domain automatically, and vice versa of course.
I added SESSION_COOKIE_DOMAIN = 'maindomain.com' to both askbot and blogs, but it doesn't help. What is common solution for this?
P.S. Tow applications are different django instances that everyone in its own virtualenv with own 'settings.py' file. Thanks!

edit:
Configs are same for two sites:

CACHES = {
'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': '127.0.0.1:11211',
        'KEY_PREFIX': 'production'
           }
    }
CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True

#SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
SESSION_COOKIE_DOMAIN = '.domain.org'
SESSION_COOKIE_NAME = "sesid"

I've tried various session engines, but seems that problem is not here..

cookie domain-subdomain

Hi all!
I've deployed askbot on subdomain and I have another django application (blogs) that runs on main domain. Both share the same database, so users are registered and logged in only with askbot.
But now I want users that logged in on subdomain will be "logged in" on main domain automatically, and vice versa of course.
I added SESSION_COOKIE_DOMAIN = 'maindomain.com' to both askbot and blogs, but it doesn't help. What is common solution for this?
P.S. Tow applications are different django instances that everyone in its own virtualenv with own 'settings.py' file. Thanks!

edit:
Configs are same for two sites:

CACHES = {
'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': '127.0.0.1:11211',
        'KEY_PREFIX': 'production'
           }
    }
CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True

#SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
SESSION_COOKIE_DOMAIN = '.domain.org'
SESSION_COOKIE_NAME = "sesid"

I've tried various session engines, but seems that problem is not here.. Thanks!

cookie domain-subdomain

Hi all!
I've deployed askbot on subdomain and I have another django application (blogs) that runs on main domain. Both share the same database, so users are registered and logged in only with askbot.
But now I want users that logged in on subdomain will be "logged in" logged in on main domain automatically, and vice versa of course.
I added SESSION_COOKIE_DOMAIN = 'maindomain.com' to both askbot and blogs, but it doesn't help. What is common solution for this?
P.S. Tow applications are different django instances that everyone in its own virtualenv with own 'settings.py' file. Thanks!

cookie domain-subdomain

Hi all!
I've deployed askbot on subdomain and I have another django application (blogs) that runs on main domain. Both share the same database, so users are registered and logged in only with askbot.
But now I want users that logged in on subdomain sumdomain will be logged in on main min domain automatically, and vice versa of course.
I added SESSION_COOKIE_DOMAIN = 'maindomain.com' to both askbot and blogs, but it doesn't help. What is common solution for this?
P.S. Tow applications are different django instances that everyone in its own virtualenv with own 'settings.py' file. Thanks!