summaryrefslogtreecommitdiff
path: root/tests/template_tests/test_partials.py
AgeCommit message (Collapse)Author
2025-09-04Refs #36559, #35667 -- Used skip_file_prefixes in PartialTemplate.source ↵farhan
warning.
2025-09-03Fixed #36559 -- Respected verbatim and comment blocks in PartialTemplate.source.farhan
2025-09-03Refs #36559 -- Ran template partial source tests in debug mode only.farhan
Added a warning for accessing PartialTemplate.source when debugging is disabled. Thanks Sarah Boyce for the idea.
2025-08-14Fixed #36410 -- Added support for Template Partials to the Django Template ↵farhan
Language. Introduced `{% partialdef %}` and `{% partial %}` template tags to define and render reusable named fragments within a template file. Partials can also be accessed using the `template_name#partial_name` syntax via `get_template()`, `render()`, `{% include %}`, and other template-loading tools. Adjusted `get_template()` behavior to support partial resolution, with appropriate error handling for invalid names and edge cases. Introduced `PartialTemplate` to encapsulate partial rendering behavior. Includes tests and internal refactors to support partial context binding, exception reporting, and tag validation. Co-authored-by: Carlton Gibson <carlton@noumenal.es> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com> Co-authored-by: Nick Pope <nick@nickpope.me.uk>