Author: batiste.bieler
Date: Thu Apr 23 08:06:15 2009
New Revision: 473

Modified:
    trunk/example/templates/pages/index.html
    trunk/pages/templatetags/pages_tags.py

Log:
Fix issue 95

Modified: trunk/example/templates/pages/index.html
==============================================================================
--- trunk/example/templates/pages/index.html    (original)
+++ trunk/example/templates/pages/index.html    Thu Apr 23 08:06:15 2009
@@ -95,6 +95,11 @@

  <h2>Content</h2>

+{% if current_page %}
+<p>Page absolute url : {% show_absolute_url current_page %}</p>
+<p>Page absolute url using the page slug : {% show_absolute_url  
current_page.slug %}</p>
+{% endif %}
+
  {% placeholder right-column with RichTextarea parsed as right_column %}

  {% block content %}

Modified: trunk/pages/templatetags/pages_tags.py
==============================================================================
--- trunk/pages/templatetags/pages_tags.py      (original)
+++ trunk/pages/templatetags/pages_tags.py      Thu Apr 23 08:06:15 2009
@@ -8,7 +8,7 @@

  from pages import settings
  from pages.models import Content, Page
-from pages.utils import get_language_from_request
+from pages.utils import get_language_from_request, get_page_from_slug

  register = template.Library()

@@ -162,8 +162,8 @@
      """
      request = context.get('request', False)
      # if the page is a SafeUnicode, try to use it like a slug
-    if isinstance(page, SafeUnicode):
-        page = get_page_from_slug(slug, request)
+    if isinstance(page, SafeUnicode) or isinstance(page, unicode):
+        page = get_page_from_slug(page, request)
      if not request or not page:
          return {'content':''}
      if lang is None:

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