Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Separate Django sites with a common authetication/registration backend

I need split my current Django application into two sites.

Site A will contain the public facing site which would contain all the static pages and the registration system.

The other site — Site B — is the site for registered users. They can also log-in to application site through Site B.

If I'm not mistaken, I can use django.contrib.sites framework to accomplish the task of having multiple sites but can have a common authetication/registration backend?

How can I accomplish this?

Thanks.

like image 700
Mridang Agarwalla Avatar asked Sep 07 '11 13:09

Mridang Agarwalla


1 Answers

Django's django.contrib.sites framework is nice if both sites are running under the same server and access the same database. If you have a distributed application (different sites on different hosts or different sites on different databases), you can resort to single sign-on solutions.

I use OpenID with a custom provider to centralize logins between apps running on different databases. Other solutions include CAS (provider and consumer).

like image 198
André Caron Avatar answered Oct 01 '22 13:10

André Caron