Mercurial > p > roundup > code
comparison roundup/cgi/templating.py @ 7866:9bbc1d951677
issue2551331 - Fix repeat first/last methods.
The first() and last() methods for a variable defined by tal:repeat
now work as documented.
There is an undocumented same_part() method for repeat. It is called
by first/last and can cause them to return true when not at an end of
the Iterator sequence. I wrote a treatise on that function and what it
does. I have no idea why it does what it does.
Added tests for roundup/cgi/ZTUtils/Iterator.py
Also fixes issue with roman() found while writing tests. lower wasn't
being called and it was printing the lower() method signature.
Doc updates in references.txt to come in a future checkin. Clarifying
the repeat methods led to finding/fixing this.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 07 Apr 2024 20:52:17 -0400 |
| parents | b080cdb8b199 |
| children | 7d621b3ba8ba |
comparison
equal
deleted
inserted
replaced
| 7865:ee586ff074ed | 7866:9bbc1d951677 |
|---|---|
| 2141 """ Render a form edit field for the property | 2141 """ Render a form edit field for the property |
| 2142 | 2142 |
| 2143 If not editable, just display the value via plain(). | 2143 If not editable, just display the value via plain(). |
| 2144 | 2144 |
| 2145 In addition to being able to set arbitrary html properties | 2145 In addition to being able to set arbitrary html properties |
| 2146 using prop=val arguments, the thre arguments: | 2146 using prop=val arguments, the three arguments: |
| 2147 | 2147 |
| 2148 y_label, n_label, u_label let you control the labels | 2148 y_label, n_label, u_label let you control the labels |
| 2149 associated with the yes, no (and optionally unknown/empty) | 2149 associated with the yes, no (and optionally unknown/empty) |
| 2150 values. | 2150 values. |
| 2151 | 2151 |
