I have two Django web apps that use the same database and modules, my issue is, I want one of the websites to act as primary site "A" (e.g. for secure authentication, as only site A will be under the https scheme, mind you "B" is under a subdomain of "A" so there's no real cross domain issues involved as I share the secret key between the settings files).
So far I have setup the Django sites framework, so my main "A" site is equipped with its own settings and urls module, as is my secondary (slave) site "B".
Now how would I go on implementing a way of proxy-ing the urls from "B" that require https, without repeating my self over and over again, mind you I use i18n patterns.
So basically I need a way for my apps to tell that the "login" url in urls_site_b
should proxy to "login" in urls_site_a
, then return to site B after success (using the next param for example).
I am considering a proxy-ing piece of middleware but that doesn't solve the part identifying which urls should be linked. I thought about a constant setting that holds a list of urls that should be proxied. However programming such will take some time I rather have some sort of advise before I proceed.
Also in my templates (which are shared aswell) I would use the {% url %}
tag, this might be a problem as the tag wouldn't resolve the correct url as it only looks in the urls module that belongs to the current site.