Pages in different Sites #1229

evildmp opened this Issue May 24, 2012 · 8 comments

7 participants


It seems to me that the mechanisms for getting a Page's URL don't interact with the sites framework as it should.

Suppose you have two Sites on different domains, and

Now in one Page belonging to the Site, you insert a link to a Page on SIte

In such a case, the URL that is generated can't be only the /path/to/page - it needs to be:

If I understand this correctly, what is required is something that compares the site_id of the Page we are in with the site_id of the Page we want to get to - and if they are different, prepends the Site.domain to its URL.


Actually, I think I may have misunderstood the intention. It seems that the responsibility for prepending domain information to the path lies not within the Pages mechanisms, but within whatever is wanting to link to a page.

If that's the case perhaps this is a non-issue and should be closed - but I think it probably needs a bit of documentation.


Documentation problem in my opinion.


Shouldn't the page be Site-aware?
Demanding every code that return a link to a page to solve the multi-site issue it's not that smart.
Even if admittedly this should be solved on the django side.


Django applications should be able to work out of the box for multi-sites, if the application does not rely on stuff such as settings.SITE_ID. As Chris Beaven pointed out in his post on :

Specifically, any well-written apps should now be using the get_current_site function
from django.contrib.sites.models. When the sites app isn't installed, this function will
just return an instance of a RequestSite object (not a model) which works similarly to
a standard Site instance.

Since Django-CMS still uses a hard coded settings.SITE_ID in some places, I would consider this as a bug. Therefore running the same Django-CMS for different domains makes configuration quite tricky.
My proposal is to fix this in Django-CMS directly. I have seen that this would not affect too much code. I can do it.


@jrief go ahead :)

Divio AG member

new link plugin is site aware.....

@digi604 digi604 added this to the Some Day milestone Feb 10, 2014

Great! Unfortunately I had not enough time to implement this myself.

Divio AG member

This looks like it's fixed.

@czpython czpython closed this May 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment