Mercurial > p > roundup > code
comparison roundup/cgi/templating.py @ 6428:32a04dc87b30
Make HTMLClass::history signature compatible to _HTMLItem::history
_HTMLItem::history accepts 4 optional named parameters. If a template
(e.g. issue.item.html) calls history with a named param and then is
called in the context of creating a new issue, you get a traceback.
Change HTMLClass::history to accept any named parameter so
adding new named params to _HTMLItem::history doesn't
require a change to HTMLClass::history.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Fri, 04 Jun 2021 07:28:18 -0400 |
| parents | 91ae685405ba |
| children | 3ca8b6145167 |
comparison
equal
deleted
inserted
replaced
| 6427:f08907bfd5a1 | 6428:32a04dc87b30 |
|---|---|
| 956 self.input(type="hidden", name="@csrf", | 956 self.input(type="hidden", name="@csrf", |
| 957 value=anti_csrf_nonce(self._client)) + \ | 957 value=anti_csrf_nonce(self._client)) + \ |
| 958 '\n' + \ | 958 '\n' + \ |
| 959 self.input(type="hidden", name="@action", value=action) | 959 self.input(type="hidden", name="@action", value=action) |
| 960 | 960 |
| 961 def history(self): | 961 def history(self, **args): |
| 962 if not self.is_view_ok(): | 962 if not self.is_view_ok(): |
| 963 return self._('[hidden]') | 963 return self._('[hidden]') |
| 964 return self._('New node - no history') | 964 return self._('New node - no history') |
| 965 | 965 |
| 966 def renderWith(self, name, **kwargs): | 966 def renderWith(self, name, **kwargs): |
