diff roundup/cgi/templating.py @ 3394:5c7ff95fecad

work around pagetemplate oddity
author Richard Jones <richard@users.sourceforge.net>
date Mon, 18 Jul 2005 01:47:22 +0000
parents c1c67c62b699
children 62e4032cb280
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Mon Jul 18 01:43:56 2005 +0000
+++ b/roundup/cgi/templating.py	Mon Jul 18 01:47:22 2005 +0000
@@ -1614,8 +1614,12 @@
 
     def __getattr__(self, attr):
         ''' return a new HTMLItem '''
-       #print 'Link.getattr', (self, attr, self._value)
         if not self._value:
+            # handle a special page templates lookup
+            if attr == '__render_with_namespace__':
+                def nothing(*args, **kw):
+                    return ''
+                return nothing
             msg = self._('Attempt to look up %(attr)s on a missing value')
             return MissingValue(msg%locals())
         i = HTMLItem(self._client, self._prop.classname, self._value)

Roundup Issue Tracker: http://roundup-tracker.org/