diff options
| author | Carlton Gibson <carlton.gibson@noumenal.es> | 2023-09-29 19:02:19 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-10-02 16:16:43 +0200 |
| commit | 35bbb2c9c01882b1d77b0b8c737ac646144833d4 (patch) | |
| tree | f10240809715d7855db319d1dbad4eaadadb0dba /docs | |
| parent | f4e72e6523e6968d9628dfbff914ab57dbf19e6b (diff) | |
Fixed #34883 -- Allowed template tags to set extra data on templates.
By setting a value in the `parser.extra_data` mapping, template tags
pass additional data out of the parsing context.
Any extra data set is exposed on the template via the matching
`.extra_data` attribute.
Library authors should use a key to namespace extra data. The 'django'
namespace is reserved for internal use.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/5.1.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/releases/5.1.txt b/docs/releases/5.1.txt index 1e2eb97557..bd70a2c7ac 100644 --- a/docs/releases/5.1.txt +++ b/docs/releases/5.1.txt @@ -194,7 +194,9 @@ Signals Templates ~~~~~~~~~ -* ... +* Custom tags may now set extra data on the ``Parser`` object that will later + be made available on the ``Template`` instance. Such data may be used, for + example, by the template loader, or other template clients. Tests ~~~~~ |
