| Age | Commit message (Collapse) | Author |
|
|
|
truncated_unordered_list filter.
|
|
|
|
While working on https://github.com/typeddjango/django-stubs/pull/3114/changes#diff-c408a224a641ee1ad26789d61b19c64c44667c1feb8fce0d58aea0338844ca66R276-R278 we have noticed that loop variables leak into the module namespace.
It has two negative effects:
1. Users can access `smartif.op` and `smartif.key` public attrs, which is clearly not intenteded
2. We in `django-stubs` have to ignore these two objects from annotations
Let's remove them :)
|
|
deferred annotations.
Provide a wrapper for safe introspection of user functions on Python 3.14+.
Follow-up to 601914722956cc41f1f2c53972d669ddee6ffc04.
|
|
https://github.com/psf/black/releases/tag/26.1.0
|
|
querystring template tag.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
Before, `context` and `content` were validated at compile time.
|
|
Ideally, this will be reverted when an upstream solution is available for
https://github.com/python/cpython/issues/141560.
Thanks Patrick Rauscher for the report and Augusto Pontes for the
first iteration and test.
|
|
|
|
warning.
|
|
|
|
Added a warning for accessing PartialTemplate.source when debugging is disabled.
Thanks Sarah Boyce for the idea.
|
|
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>
|
|
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>
|
|
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
|
|
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.
|
|
|
|
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>
|
|
variable names.
Regression in 5183f7c287a9a5d61ca1103b55166cda52d9c647.
Thank you to Jon Banafato and Baptiste Mispelon for the report.
|
|
|
|
|
|
template tag.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
path with an unknown origin.
|
|
Thanks Sarah Boyce for the report.
|
|
|
|
* 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>
|
|
https://github.com/psf/black/releases/tag/25.1.0
|
|
|
|
template tag.
Thank you to David Feeley for the report and Natalia Bidart for the review.
|
|
Co-authored-by: Brock <bsmick97@gmail.com>
|
|
|
|
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
super objects are copyable on Python 3.14+:
https://github.com/python/cpython/commit/5ca4e34bc1aab8321911aac6d5b2b9e75ff764d8
and can no longer be used in BaseContext.__copy__().
|
|
in the template.
|
|
with __class_get_item__.
|
|
Thanks Elias Myllymäki for the report.
Co-authored-by: Shai Berger <shai@platonix.com>
|
|
|
|
|
|
that can be flattened.
|
|
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).
|
|
Thanks Adam Johnson for reviews.
|
|
|
|
https://github.com/psf/black/releases/tag/24.1.0
|
|
|
|
|
|
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.
|
|
TemplatesSetting.
Regression in 439242c5943e16dd5a3a68fadac76e5e723eb323.
|
|
|
|
renderer.
|