Mercurial > p > roundup > code
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 3393:18e6e1326d4b | 3394:5c7ff95fecad |
|---|---|
| 1612 if str(self._value) == '-1': | 1612 if str(self._value) == '-1': |
| 1613 self._value = None | 1613 self._value = None |
| 1614 | 1614 |
| 1615 def __getattr__(self, attr): | 1615 def __getattr__(self, attr): |
| 1616 ''' return a new HTMLItem ''' | 1616 ''' return a new HTMLItem ''' |
| 1617 #print 'Link.getattr', (self, attr, self._value) | |
| 1618 if not self._value: | 1617 if not self._value: |
| 1618 # handle a special page templates lookup | |
| 1619 if attr == '__render_with_namespace__': | |
| 1620 def nothing(*args, **kw): | |
| 1621 return '' | |
| 1622 return nothing | |
| 1619 msg = self._('Attempt to look up %(attr)s on a missing value') | 1623 msg = self._('Attempt to look up %(attr)s on a missing value') |
| 1620 return MissingValue(msg%locals()) | 1624 return MissingValue(msg%locals()) |
| 1621 i = HTMLItem(self._client, self._prop.classname, self._value) | 1625 i = HTMLItem(self._client, self._prop.classname, self._value) |
| 1622 return getattr(i, attr) | 1626 return getattr(i, attr) |
| 1623 | 1627 |
