summaryrefslogtreecommitdiff
path: root/docs/ref/templates
AgeCommit message (Collapse)Author
2026-02-25Fixed #36944 -- Removed MAX_LENGTH_HTML and related 5M chars limit ↵Natalia
references from HTML truncation docs.
2025-08-28Fixed #36570 -- Removed unnecessary :py domain from documentation roles.SaJH
Signed-off-by: SaJH <wogur981208@gmail.com>
2025-08-25Refs #36485 -- Rewrapped docs to 79 columns line length.David Smith
Lines in the docs files were manually adjusted to conform to the 79 columns limit per line (plus newline), improving readability and consistency across the content.
2025-08-25Refs #36485 -- Removed double spaces after periods in sentences.Natalia
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>
2025-06-27Fixed #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-04-15Fixed #36311 -- Unified spelling of "hardcode" and its variants in docs.Ahmed Nassar
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-03-25Fixed #35529 -- Added support for positional arguments in querystring ↵Giannis Terzopoulos
template tag. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-03-24Fixed #36268 -- Added leading `?` in every querystring template tag result.Natalia
Thanks Sarah Boyce for the report.
2025-03-24Improved and reorganized querystring template tag docstring and ref docs.Natalia
2025-03-19Fixed #36000 -- Deprecated HTTP as the default protocol in urlize and ↵Ahmed Nassar
urlizetrunc.
2025-02-24Fixed #36186 -- Added forloop.length variable within a template for loop.Jonathan Ströbele
2025-02-24Added security guideline on reasonable size limitations when rendering ↵Sarah Boyce
content via the DTL. This also removes the need to add warnings for every Django template filter.
2025-02-13Fixed #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.
2025-01-15Removed versionadded/changed annotations for 5.1.Sarah Boyce
This also removes remaining versionadded/changed annotations for older versions.
2024-10-22Added missing alt attribute to <img> tag in docs.ssanger
2024-09-30Fixed #35797 -- Removed debug context processor from default project template.Marc Gibbons
2024-09-03Fixed CVE-2024-45230 -- Mitigated potential DoS in urlize and urlizetrunc ↵Sarah Boyce
template filters. Thanks MProgrammer (https://hackerone.com/mprogrammer) for the report.
2024-07-23Updated example links in urlize docs.Matthew Somerville
goo.gl links are being removed in 2025: https://developers.googleblog.com/en/google-url-shortener-links-will-no-longer-be-available/
2024-07-22Refs #10941 -- Reorganized querystring template tag docs.nessita
2024-07-15Refs #10941 -- Renamed query_string template tag to querystring.Sarah Boyce
2024-06-20Fixed #35441 -- Documented Context and RequestContext keyword arguments.John Higgins
2024-05-22Removed versionadded/changed annotations for 5.0.Natalia
This also removes remaining versionadded/changed annotations for older versions.
2024-03-10Fixed #35280 -- Improved iriencode filter example in docs.canhuynh1998
2024-01-20Updated "Dive Into Python" links.Emmanuel Katchy
2023-12-28Corrected code-block directives in docs.Mariusz Felisiak
2023-10-26Fixed #10941 -- Added {% query_string %} template tag.Tom Carrick
2023-10-25Added missing pycon directives in various docs.Mariusz Felisiak
2023-10-04Fixed CVE-2023-43665 -- Mitigated potential DoS in ↵Natalia
django.utils.text.Truncator when truncating HTML text. Thanks Wenchao Li of Alibaba Group for the report.
2023-09-18Refs #33864 -- Removed length_is template filter per deprecation timeline.Mariusz Felisiak
2023-09-18Removed versionadded/changed annotations for 4.2.Mariusz Felisiak
This also removes remaining versionadded/changed annotations for older versions.
2023-07-03Fixed #33405, Refs #7177 -- Clarified docs for filter escapejs regarding ↵Jon Ribbens
safe and unsafe usages.
2023-05-31Fixed #34600 -- Removed references to bleach in docs.Akash Kumar Sen
2023-05-26Refs #34574, Refs #34577 -- Mentioned escapeseq filter in escape/autoescape ↵Natalia
docs.
2023-05-26Fixed #34574 -- Noted unexpected outcomes in autoescape/escape docs.Natalia
2023-05-22Fixed #34577 -- Added escapeseq template filter.Arthur Moreira
2023-05-07Corrected code-block directive in docs/ref/templates/builtins.txt.Pan Dango
2023-05-04Corrected code-block directives in docs.Jannis Vajen
2023-03-01Fixed #34140 -- Reformatted code blocks in docs with blacken-docs.django-bot
2023-02-28Refs #34140 -- Corrected rst code-block and various formatting issues in docs.Joseph Victor Zammit
2023-02-10Refs #34140 -- Applied rst code-block to non-Python examples.Carlton Gibson
Thanks to J.V. Zammit, Paolo Melchiorre, and Mariusz Felisiak for reviews.
2023-01-17Refs #32873 -- Removed settings.USE_L10N per deprecation timeline.Mariusz Felisiak
2023-01-17Removed versionadded/changed annotations for 4.1.Mariusz Felisiak
2023-01-12Refs #26029 -- Deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings.Jarosław Wygoda
2022-07-23Fixed #33864 -- Deprecated length_is template filter.Nick Pope
2022-07-22Fixed #33317 -- Added note about unconditional evaluation of {% block %} tags.Victor
2022-05-31Fixed docs build with sphinxcontrib-spelling 7.5.0+.Mariusz Felisiak
sphinxcontrib-spelling 7.5.0+ includes captions of figures in the set of nodes for which the text is checked.
2022-05-17Removed versionadded/changed annotations for 4.0.Carlton Gibson
2022-04-19Fixed #33639 -- Enabled cached template loader in development.Carlton Gibson
2022-03-10Changed some words to use inline markup.David Smith