mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #32824 -- Improved performance of NodeList.render().
This avoids the following: - checking that each item in the nodelist is a subclass of Node, - calling str() on the render_annotated() output, because it's documented that Node.render() must return a string, - calling mark_safe() on the output, when the value to be wrapped is definitively known to be a string because the result of ''.join() is always of that type, - using an intermediate list to store each individual string.
This commit is contained in:
parent
2dfc1066a0
commit
854e9b0668
3 changed files with 9 additions and 10 deletions
|
@ -463,6 +463,10 @@ Miscellaneous
|
|||
:class:`~django.utils.feedgenerator.Atom1Feed`, and their subclasses now
|
||||
emit elements with no content as self-closing tags.
|
||||
|
||||
* ``NodeList.render()`` no longer casts the output of ``render()`` method for
|
||||
individual nodes to a string. ``Node.render()`` should always return a string
|
||||
as documented.
|
||||
|
||||
.. _deprecated-features-4.0:
|
||||
|
||||
Features deprecated in 4.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue