Mercurial > p > roundup > code
diff CHANGES.txt @ 8262:2a7c3eeaf167
feat: add templating utils method dynamically; method to set http code
Added new utils.set_http_response(integer) to set the HTML response
code from a template. Useful for error handling inside template.
Also noted that a real TemplatingUtils (like set_http_response) method
gets the TemplatingUtils object instance, but there is no way to do
this with registerUtil() from an extension file.
Added new instance.registerUtilMethod() method to register a function
in an extension as a method passing the client instance in as the first
parameter (aka self).
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 07 Jan 2025 20:22:33 -0500 |
| parents | cae1bbf2536b |
| children | 35beff316883 |
line wrap: on
line diff
--- a/CHANGES.txt Sun Jan 05 00:59:12 2025 -0500 +++ b/CHANGES.txt Tue Jan 07 20:22:33 2025 -0500 @@ -95,7 +95,13 @@ - issue2551116 - Replace xmlrpclib (xmlrpc.client) with defusedxml. Added support for defusedxml to better secure the xmlrpc endpoint. (John Rouillard) - +- Added new instance.registerUtilMethod() method to make using complex + templating easier as it provides a default Client instance to the + templating method. (John Rouillard) +- Added new templating utils.set_http_response(integer) method to + allow reporting an error to the user from a template. (John + Rouillard) + 2024-07-13 2.4.0 Fixed:
