django/tests/template_tests/syntax_tests
farhan 5e06b97095
Some checks failed
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.13 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
Docs / spelling (push) Has been cancelled
Docs / blacken-docs (push) Has been cancelled
Fixed #36410 -- Added support for Template Partials to the Django Template 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>
2025-08-14 21:53:14 -03:00
..
i18n Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
__init__.py
test_autoescape.py
test_basic.py Fixed #28050 -- Added template name to TemplateSyntaxError. 2025-04-17 08:56:53 +02:00
test_builtins.py
test_cache.py
test_comment.py
test_cycle.py
test_debug.py
test_exceptions.py Fixed #36271 -- Raised TemplateSyntaxError when using a relative template path with an unknown origin. 2025-03-24 17:05:58 +01:00
test_extends.py
test_filter_syntax.py
test_filter_tag.py
test_firstof.py
test_for.py Fixed #36186 -- Added forloop.length variable within a template for loop. 2025-02-24 16:25:53 +01:00
test_if.py
test_if_changed.py Refs #36500 -- Rewrapped long docstrings and block comments via a script. 2025-07-23 20:17:55 -03:00
test_include.py Fixed #35493 -- Allowed template self-inclusion with relative paths. 2024-12-06 10:44:10 +01:00
test_invalid_string.py
test_list_index.py
test_load.py
test_lorem.py
test_multiline.py
test_named_endblock.py
test_now.py
test_numpy.py
test_partials.py Fixed #36410 -- Added support for Template Partials to the Django Template Language. 2025-08-14 21:53:14 -03:00
test_querystring.py Fixed #35529 -- Added support for positional arguments in querystring template tag. 2025-03-25 12:23:41 -03:00
test_regroup.py
test_resetcycle.py
test_setup.py
test_simple_tag.py
test_spaceless.py
test_static.py
test_template_tag.py
test_url.py
test_verbatim.py
test_width_ratio.py
test_with.py