v0.145.0ยค
Perfยค
Rendering components is now ~20% faster, thanks to:
- using Rust-based template tag parsing
- skipping input validation in favour of on-exception handling
Featยค
-
BaseNodeclass now has thefiltersandtagsattributes. These dictionaries keep track of what filters and tags can be used within the{% %}tag.Extensions can use these attributes to add custom filters and tags to the tag.
-
When creating custom template tags with
BaseNodeclass or@template_tagdecorator, you now get an error when the tag name is the same as one of the flags:
Refactorยค
-
In template, when a component tag has a positional argument after a keyword argument it now raises
SyntaxErrorinstead ofTypeError. -
When a component tag receives multiple kwargs with the same name, it no longer raises
TypeError.
Instead, the later kwargs overwrite the earlier ones.
```django
{% mytag 'John' x=123 x=456 %}
```
-
All template tags (
{% component %},{% slot %}, etc.) now include the exact tag (as found in the template) in the error message when an error occurs: