mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Fixed #32814 -- Improved performance of TextNode.
This avoids calling render() and handling exceptions, which is not necessary for text nodes.
This commit is contained in:
parent
bbf09254a3
commit
7f6a41d3d9
1
AUTHORS
1
AUTHORS
@ -520,6 +520,7 @@ answer newbie questions, and generally made Django that much better:
|
||||
Keith Bussell <kbussell@gmail.com>
|
||||
Kenneth Love <kennethlove@gmail.com>
|
||||
Kent Hauser <kent@khauser.net>
|
||||
Keryn Knight <keryn@kerynknight.com>
|
||||
Kevin Grinberg <kevin@kevingrinberg.com>
|
||||
Kevin Kubasik <kevin@kubasik.net>
|
||||
Kevin McConnell <kevin.mcconnell@gmail.com>
|
||||
|
@ -981,6 +981,15 @@ class TextNode(Node):
|
||||
def render(self, context):
|
||||
return self.s
|
||||
|
||||
def render_annotated(self, context):
|
||||
"""
|
||||
Return the given value.
|
||||
|
||||
The default implementation of this method handles exceptions raised
|
||||
during rendering, which is not necessary for text nodes.
|
||||
"""
|
||||
return self.s
|
||||
|
||||
|
||||
def render_value_in_context(value, context):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user