Author: david.michon
Date: Wed May 27 06:05:08 2009
New Revision: 533
Modified:
branches/electron/pages/managers.py
branches/electron/pages/views.py
Log:
fix no display for hidden pages
Modified: branches/electron/pages/managers.py
==============================================================================
--- branches/electron/pages/managers.py (original)
+++ branches/electron/pages/managers.py Wed May 27 06:05:08 2009
@@ -50,7 +50,7 @@
if settings.PAGE_USE_SITE_ID:
queryset = queryset.filter(sites=settings.SITE_ID)
- queryset = queryset.filter(status=self.model.PUBLISHED)
+ queryset = queryset.exclude(status=self.model.DRAFT)
if settings.PAGE_SHOW_START_DATE:
queryset =
queryset.filter(publication_date__lte=datetime.now())
Modified: branches/electron/pages/views.py
==============================================================================
--- branches/electron/pages/views.py (original)
+++ branches/electron/pages/views.py Wed May 27 06:05:08 2009
@@ -34,7 +34,7 @@
if slug:
current_page = get_page_from_slug(slug, request, lang)
elif pages:
- current_page = pages[0]
+ current_page = Page.objects.published().order_by("tree_id")[0]
if not current_page:
raise Http404
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---