I have two sites say foo.com and bar.com and are both Django based. Primary registration occurs on foo.com (I\'d like the main user db to be here) and I\'d like for three th
It depends on your requirements. If you're able to, the simple solution is to simply host both sites on one Django instance. In other words, your Django project hosts both sites but you have a url rewrite rule that maps foo.com
to http://localhost/foo/
and bar.com
to http://localhost/bar/
. Django's auth system will "just work" under this scenario. Rewrite rules can of course also apply to subdomains; I've built a system that hosts hundreds of subdomains using this technique.
If this isn't an option, sharing databases between your Django instances and setting SESSION_COOKIE_DOMAIN
, as mentioned by others, should work.