Author: gabriel.walt
Date: Mon May  4 02:42:14 2009
New Revision: 496

Modified:
    branches/electron/pages/admin/__init__.py
    branches/electron/pages/models.py
    branches/electron/pages/templates/admin/pages/page/menu.html

Log:
Fixed template name in page listing

Modified: branches/electron/pages/admin/__init__.py
==============================================================================
--- branches/electron/pages/admin/__init__.py   (original)
+++ branches/electron/pages/admin/__init__.py   Mon May  4 02:42:14 2009
@@ -28,7 +28,7 @@
      # these mandatory fields are not versioned
      mandatory_placeholders = ('title', 'slug')
      general_fields = ['title', 'slug', 'status', 'target', 'position']
-
+
      # TODO: find solution to do this dynamically
      #if getattr(settings, 'PAGE_USE_SITE_ID'):
      general_fields.append('sites')

Modified: branches/electron/pages/models.py
==============================================================================
--- branches/electron/pages/models.py   (original)
+++ branches/electron/pages/models.py   Mon May  4 02:42:14 2009
@@ -205,6 +205,14 @@

          return template

+    def get_template_name(self):
+        template = self.get_template()
+        for  t in settings.PAGE_TEMPLATES:
+            if t[0] == template:
+                return t[1]
+        return template
+
+
      def traductions(self):
          langs = ""
          for lang in self.get_languages():

Modified: branches/electron/pages/templates/admin/pages/page/menu.html
==============================================================================
--- branches/electron/pages/templates/admin/pages/page/menu.html        
(original)
+++ branches/electron/pages/templates/admin/pages/page/menu.html        Mon May 
 4  
02:42:14 2009
@@ -50,7 +50,7 @@
              </select>
          </td>
          <td class="template-cell">
-            {{ page.get_template }}
+            {{ page.get_template_name }}
          </td>
          <td class="author-cell">
              {% cache 10000 page_author page.author_id %}

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