| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2025-09-12 | Refs #35667 -- Cached Django file prefixes for warnings. | Adam Johnson | |
| 2025-09-04 | Refs #36559, #35667 -- Used skip_file_prefixes in PartialTemplate.source ↵ | farhan | |
| warning. | |||
| 2025-09-03 | Fixed #36559 -- Respected verbatim and comment blocks in PartialTemplate.source. | farhan | |
| 2025-09-03 | Refs #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-14 | Fixed #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> | |||
| 2025-07-28 | Fixed #36519 -- Made center template filter consistent for even/odd padding. | mriduldhall | |
| Refactored `center` template filter to match f-string behaviour, producing consistent padding for both odd and even fillings. Thanks Lily Acorn for the report and Natalia Bidart for the review. Co-authored-by: Lily Acorn <code@lilyf.org> | |||
| 2025-07-23 | Refs #36500 -- Rewrapped long docstrings and block comments via a script. | django-bot | |
| Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505. | |||
| 2025-07-23 | Refs #36500 -- Shortened some long docstrings and comments. | Mike Edmunds | |
| Manually reformatted some long docstrings and comments that would be damaged by the to-be-applied autofixer script, in cases where editorial judgment seemed necessary for style or wording changes. | |||
| 2025-07-23 | Removed double spaces after periods and within phrases. | Sarah Boyce | |
| 2025-06-27 | Fixed #15727 -- Added Content Security Policy (CSP) support. | Rob Hudson | |
| This initial work adds a pair of settings to configure specific CSP directives for enforcing or reporting policy violations, a new `django.middleware.csp.ContentSecurityPolicyMiddleware` to apply the appropriate headers to responses, and a context processor to support CSP nonces in templates for safely inlining assets. Relevant documentation has been added for the 6.0 release notes, security overview, a new how-to page, and a dedicated reference section. Thanks to the multiple reviewers for their precise and valuable feedback. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com> | |||
| 2025-06-18 | Fixed #36465, Refs #35816 -- Disallowed '+' and '-' characters in template ↵ | haileyajohnson | |
| variable names. Regression in 5183f7c287a9a5d61ca1103b55166cda52d9c647. Thank you to Jon Banafato and Baptiste Mispelon for the report. | |||
| 2025-04-17 | Fixed #28050 -- Added template name to TemplateSyntaxError. | farhan | |
| 2025-03-31 | Refs #28909 -- Simplified code using unpacking generalizations. | Aarni Koskela | |
| 2025-03-25 | Fixed #35529 -- Added support for positional arguments in querystring ↵ | Giannis Terzopoulos | |
| template tag. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com> | |||
| 2025-03-24 | Fixed #36271 -- Raised TemplateSyntaxError when using a relative template ↵ | YogyaChugh | |
| path with an unknown origin. | |||
| 2025-03-24 | Fixed #36268 -- Added leading `?` in every querystring template tag result. | Natalia | |
| Thanks Sarah Boyce for the report. | |||
| 2025-03-24 | Improved and reorganized querystring template tag docstring and ref docs. | Natalia | |
| 2025-03-11 | Fixed #35816 -- Handled parsing of scientific notation in DTL. (#19213) | haileyajohnson | |
| * Refs #35816 -- Improved test coverage of FilterExpression. * Fixed #35816 -- Made FilterExpression parse scientific numbers. --------- Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | |||
| 2025-03-01 | Applied Black's 2025 stable style. | Mariusz Felisiak | |
| https://github.com/psf/black/releases/tag/25.1.0 | |||
| 2025-02-24 | Fixed #36186 -- Added forloop.length variable within a template for loop. | Jonathan Ströbele | |
| 2025-02-13 | Fixed #36182 -- Returned "?" if all parameters are removed in querystring ↵ | Sarah Boyce | |
| template tag. Thank you to David Feeley for the report and Natalia Bidart for the review. | |||
| 2024-12-06 | Fixed #35493 -- Allowed template self-inclusion with relative paths. | Gabriel Nick Pivovarov | |
| Co-authored-by: Brock <bsmick97@gmail.com> | |||
| 2024-11-28 | Fixed #35897 -- Removed unnecessary escaping in template's get_exception_info(). | Klaas van Schelven | |
| 2024-11-19 | Fixed #35535 -- Added template tag decorator simple_block_tag(). | Jake Howard | |
| Co-authored-by: Natalia <124304+nessita@users.noreply.github.com> | |||
| 2024-11-18 | Refs #35844 -- Fixed copying BaseContext and its subclasses on Python 3.14+. | Mariusz Felisiak | |
| super objects are copyable on Python 3.14+: https://github.com/python/cpython/commit/5ca4e34bc1aab8321911aac6d5b2b9e75ff764d8 and can no longer be used in BaseContext.__copy__(). | |||
| 2024-10-10 | Fixed #35789 -- Improved the error message raised when the tag must be first ↵ | ekinertac | |
| in the template. | |||
| 2024-09-17 | Fixed #35735 -- Enabled template access to methods and properties of classes ↵ | Fabian Braun | |
| with __class_get_item__. | |||
| 2024-08-06 | Fixed CVE-2024-41989 -- Prevented excessive memory consumption in floatformat. | Sarah Boyce | |
| Thanks Elias Myllymäki for the report. Co-authored-by: Shai Berger <shai@platonix.com> | |||
| 2024-07-22 | Applied optimizations to template.utils.get_app_template_dirs(). | sobolevn | |
| 2024-07-15 | Refs #10941 -- Renamed query_string template tag to querystring. | Sarah Boyce | |
| 2024-06-13 | Fixed #35417 -- Updated BaseContext.new() with values to create a context ↵ | George Y. Kussumoto | |
| that can be flattened. | |||
| 2024-04-24 | Fixed #35395 -- slice filter crashes on an empty dict with Python 3.12. | Tim Richardson | |
| Keep consistent behaviour of slice() filter between python 3.12 and prior versions in the case of a dict passed to the filter (catch the new to python 3.12 KeyError exception). | |||
| 2024-03-27 | Fixed #35233 -- Moved template engine system checks to backend methods. | Giannis Terzopoulos | |
| Thanks Adam Johnson for reviews. | |||
| 2024-03-10 | Fixed #35286 -- Updated broken link in django/template/smartif.py docstring. | umair mehmood | |
| 2024-01-26 | Applied Black's 2024 stable style. | Mariusz Felisiak | |
| https://github.com/psf/black/releases/tag/24.1.0 | |||
| 2023-11-24 | Fixed #34983 -- Deprecated django.utils.itercompat.is_iterable(). | Nick Pope | |
| 2023-10-26 | Fixed #10941 -- Added {% query_string %} template tag. | Tom Carrick | |
| 2023-10-02 | Fixed #34883 -- Allowed template tags to set extra data on templates. | Carlton Gibson | |
| By setting a value in the `parser.extra_data` mapping, template tags pass additional data out of the parsing context. Any extra data set is exposed on the template via the matching `.extra_data` attribute. Library authors should use a key to namespace extra data. The 'django' namespace is reserved for internal use. | |||
| 2023-09-29 | Fixed #34878 -- Fixed autoreloader crash when FORM_RENDERER is set to ↵ | Dan Jacob | |
| TemplatesSetting. Regression in 439242c5943e16dd5a3a68fadac76e5e723eb323. | |||
| 2023-09-18 | Refs #33864 -- Removed length_is template filter per deprecation timeline. | Mariusz Felisiak | |
| 2023-08-09 | Fixed #34692 -- Made autoreloader reset cached template loader for default ↵ | priyank.panchal | |
| renderer. | |||
| 2023-08-02 | Removed unneeded escapes in regexes. | Mariusz Felisiak | |
| Special characters lose their special meaning inside sets of characters. "-" lose its special meaning if it's placed as the first or last character. Follow up to 7c6b66383da5f9a67142334cd2ed2d769739e8f1. | |||
| 2023-05-22 | Fixed #34577 -- Added escapeseq template filter. | Arthur Moreira | |
| 2023-05-19 | Fixed #34578 -- Made "join" template filter respect autoescape for joiner. | rajeeshp | |
| 2023-05-18 | Avoided parallel assignment in template classes. | Adam Johnson | |
| 2023-04-26 | Fixed #34518 -- Fixed crash of random() template filter with an empty list. | David Sanders | |
| 2023-04-12 | Refs #34482 -- Reverted "Fixed #32969 -- Fixed pickling HttpResponse and ↵ | Mariusz Felisiak | |
| subclasses." This reverts commit d7f5bfd241666c0a76e90208da1e9ef81aec44db. Thanks Márton Salomváry for the report. | |||
| 2023-03-29 | Fixed #34427 -- Improved error message when context processor does not ↵ | David Sanders | |
| return a dict. | |||
| 2023-02-22 | Fixed #34363 -- Fixed floatformat crash on zero with trailing zeros. | Panagiotis H.M. Issaris | |
| Regression in 08c5a787262c1ae57f6517d4574b54a5fcaad124. Follow up to 4b066bde692078b194709d517b27e55defae787c. | |||
| 2023-02-08 | Refs #7430 -- Removed broken Template.__iter__(). | Anders Hovmöller | |
| Co-authored-by: Anders Hovmöller <anders.hovmoller@dryft.se> | |||
