google-code-export / django-page-cms

Automatically exported from code.google.com/p/django-page-cms
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Sites feature does not work #153

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Configure two different sites in django
2. Create a page and select just one of the sites in the box on the edit
page and save
3. The page can be viewed on both sites instead of just the one you specified

I am using release 1.0.6, installed from the tarball.

This is a pretty obvious problem, so I hope I'm not missing something. 
I've inspected managers.py to look for code that filters by the SITE_ID if
PAGE_USE_SITE_ID is set to True, but didn't find it.

I've adding these lines at line 93 of my pages/managers.py:

if settings.PAGE_USE_SITE_ID:
    pages_list = pages_list.filter(sites__id=settings.SITE_ID)

This makes it work the way I expect.  Please let me know if I am
misunderstanding how this is supposed to work.

Attached is my version of pages/managers.py with the above fix as well as
modification to fix issue 146. 

Original issue reported on code.google.com by meye...@gmail.com on 22 Aug 2009 at 4:06

Attachments:

GoogleCodeExporter commented 9 years ago
I fixed the bug parialy. But I spotted another issue with page alias.

With an alias the site framework will also break.

Original comment by batiste....@gmail.com on 24 Aug 2009 at 8:32

GoogleCodeExporter commented 9 years ago

Original comment by batiste....@gmail.com on 26 Sep 2009 at 2:08