﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36559	partialdef tag embedded in verbatim tag is treated as the source property for that named partial	Jacob Walls	Farhan Ali	"Although `partial` and `partialdef` are correctly ignored when rendered if embedded within `{% verbatim %}`, the `PartialTemplate.source` property is fooled, potentially impacting error reporting:

{{{#!py
    @setup(
        {
            ""partial_embedded_in_verbatim"": (
                ""{% verbatim %}\n""
                ""{% partialdef testing-name %}\n""
                ""{% endverbatim %}\n""
                ""{% partialdef testing-name %}\n""
                ""<p>Content</p>\n""
                ""{% endpartialdef %}\n""
            ),
        },
        test_once=True,
    )
    def test_partial_template_embedded_in_verbatim(self):
        template = self.engine.get_template(""partial_embedded_in_verbatim"")
        partial_template = template.extra_data[""partials""][""testing-name""]
        self.assertIn(""Content"", partial_template.source)
}}}

{{{#!py
======================================================================
FAIL: test_partial_template_embedded_in_verbatim (template_tests.syntax_tests.test_partials.PartialTagTests.test_partial_template_embedded_in_verbatim)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/Users/jwalls/django/django/test/utils.py"", line 458, in inner
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File ""/Users/jwalls/django/tests/template_tests/utils.py"", line 58, in inner
    func(self)
  File ""/Users/jwalls/django/tests/template_tests/syntax_tests/test_partials.py"", line 676, in test_partial_template_embedded_in_verbatim
    self.assertIn(""Content"", partial_template.source)
AssertionError: 'Content' not found in ''
}}}
----
The use case presented here isn't very serious, so I'm loathe to really mark this as a release blocker, but as it's a new feature and that's our process, and I'm not sure if there are other more important uses of the source property, I'll start there."	Bug	closed	Template system	dev	Release blocker	fixed	partials	Carlton Gibson Farhan Ali	Ready for checkin	1	0	0	0	0	0
