Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

if CMS_MODERATOR is active, also check the draft page for apphook

fixes #1103. Thanks to @andyalbrecht and @ptoal for their work on this
  • Loading branch information...
commit 0cc7e3842982e56e3a0260498bfc6cf129ffc704 1 parent 46506b7
@piquadrat piquadrat authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 cms/
7 cms/
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
from cms.apphook_pool import apphook_pool
-from cms.exceptions import NoHomeFound
from cms.utils.moderator import get_page_queryset
from django.conf import settings
@@ -9,6 +8,7 @@
from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import RegexURLResolver, Resolver404, reverse, \
+from django.db.models import Q
from django.utils.importlib import import_module
@@ -32,7 +32,10 @@ def applications_page_check(request, current_page=None, path=None):
page_id = resolver.resolve_page_id(path)
# yes, it is application page
- page = get_page_queryset(request).get(id=page_id)
+ if settings.CMS_MODERATOR:
+ page = get_page_queryset(request).get(Q(id=page_id) | Q(publisher_draft=page_id))
+ else:
+ page = get_page_queryset(request).get(id=page_id)
# If current page was matched, then we have some override for content
# from cms, but keep current page. Otherwise return page to which was application assigned.
return page
Please sign in to comment.
Something went wrong with that request. Please try again.