Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 4483:22bc0426e348
Second patch from issue2550688 -- with some changes:
- password.py now has a second class JournalPassword used for journal
storage. We have some backends that directly store serialized python
objects. Also when reading from the journal some backends expected the
string read to be usable as a parameter to a Password constructor.
This now calls a JournalPassword constructor in all these cases.
The new JournalPassword just keeps the scheme and has an empty
password.
- some factoring, move redundant implementation of "history" from
rdbms_common and back_anydbm to hyperdb.
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Thu, 14 Apr 2011 15:42:41 +0000 |
| parents | 9bbf3758c16a |
| children | 68bbefb72825 |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Thu Apr 14 12:54:52 2011 +0000 +++ b/roundup/cgi/templating.py Thu Apr 14 15:42:41 2011 +0000 @@ -1108,6 +1108,13 @@ cell[-1] += ' -> %s'%current[k] current[k] = val + elif isinstance(prop, hyperdb.Password) and args[k] is not None: + val = args[k].dummystr() + cell.append('%s: %s'%(self._(k), val)) + if current.has_key(k): + cell[-1] += ' -> %s'%current[k] + current[k] = val + elif not args[k]: if current.has_key(k): cell.append('%s: %s'%(self._(k), current[k])) @@ -1561,7 +1568,10 @@ if self._value is None: return '' - return self._('*encrypted*') + value = self._value.dummystr() + if escape: + value = cgi.escape(value) + return value def field(self, size=30, **kwargs): """ Render a form edit field for the property.
