From e6c0c5640345a17037c9602c34da9475a12e89d2 Mon Sep 17 00:00:00 2001 From: Jens Kleineheismann Date: Tue, 26 May 2026 11:54:18 +0200 Subject: [PATCH] dav_base.templatetags.include_if_exist: fixed typos --- dav_base/templatetags/dav_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dav_base/templatetags/dav_base.py b/dav_base/templatetags/dav_base.py index b8efef8..95f4c7c 100644 --- a/dav_base/templatetags/dav_base.py +++ b/dav_base/templatetags/dav_base.py @@ -10,7 +10,7 @@ def do_include_if_exist(parser, token): include_if_exist support an optional keyword 'default', which must be followed by the name of a default template. The default template will be included, if the first template does not exist. - If also the default template does not exist, the behaviour is the same as for the original (builtin) include tag. + If also the default template does not exist, the behavior is the same as for the original (builtin) include tag. If no default template is given and the first template does not exist an empty string will be returned. """ @@ -27,7 +27,7 @@ def do_include_if_exist(parser, token): token = template.base.Token(token.token_type, ' '.join(bits)) token2 = template.base.Token(token.token_type, bits[0] + ' ' + default_template + ' '.join(bits[2:])) default_node = template.loader_tags.do_include(parser, token2) - # TODO: I belive, this ist not the correct way to do things. + # TODO: I believe, this ist not the correct way to do things. # But without setting default_node.origin here the following AttributeError will be risen within the tests: # AttributeError: 'IncludeNode' object has no attribute 'origin' default_node.origin = template.Origin(name='', template_name=None)