Revision: 648
Author: batiste.bieler
Date: Fri Aug 14 15:01:51 2009
Log: Try to fix issue 147
http://code.google.com/p/django-page-cms/source/detail?r=648

Modified:
  /trunk/pages/views.py

=======================================
--- /trunk/pages/views.py       Fri Aug 14 06:19:05 2009
+++ /trunk/pages/views.py       Fri Aug 14 15:01:51 2009
@@ -52,16 +52,17 @@
          if alias:
              url = alias.page.get_absolute_url(lang)
              return HttpResponsePermanentRedirect(url)
-    else:
-        if not (request.user.is_authenticated() and request.user.is_staff)  
and \
-                current_page.calculated_status in (Page.DRAFT,  
Page.EXPIRED):
-            raise Http404
-
-        if current_page.redirect_to:
-            return HttpResponsePermanentRedirect(
-                current_page.redirect_to.get_absolute_url(lang))
-
-        template_name = current_page.get_template()
+        raise Http404
+
+    if not (request.user.is_authenticated() and request.user.is_staff) and  
\
+            current_page.calculated_status in (Page.DRAFT, Page.EXPIRED):
+        raise Http404
+
+    if current_page.redirect_to:
+        return HttpResponsePermanentRedirect(
+            current_page.redirect_to.get_absolute_url(lang))
+
+    template_name = current_page.get_template()

      if request.is_ajax():
          template_name = "body_%s" % template_name

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to