-
Fix import-time crash on Django 6.0b1 (Issue #88).
-
Added Trove classifier for Python 3.14.
- Changed internal storage key for partials from
extra_data["template-partials"]toextra_data["partials"]in django 5.1+ to maintain compatibility with Django 6.0's native template support.
-
Improved fetching partial source for debug views.
-
Refactor loader and partials handling to support Django 5.1+ extra_data on the parser instance.
-
Updated tox configuration for the latest Python and Django versions.
-
Aligned TemplateProxy render method to Django Template for compatibility with django-components.
-
Deprecated passing arguments to the
inlineargument of thepartialdeftag. Either use the literalinlineor nothing.
- Fixed a regression in 24.3 for inline partials with wrapping content.
-
Added official Django 5.1 support.
-
Allowed adding the partial name to the
endpartialdeftag, similar to howendblockallows specifying the block name again.Thanks to Matthias Kestenholz
-
Implemented
reset()on the partial loader to pass down to child loaders when the autoreloader detects a template change. This allows the cached loader to be correctly cleared in development.(The underlying issue here was masked prior to v24.1.)
-
Fixed a bug in how the partial loader called down to the cached loader when present.
Thanks to Marco Garbelini.
-
Fixed a bug automatically wrapping the template loaders when another installed app had already instantiated the template engine.
Thanks to Jannis Vajen.
This is the first major update since the initial release. It includes a number of bug fixes and adjustments from the feedback received.
Thanks to everyone who has tried the package and provided feedback.
Please read these notes carefully if you are upgrading from a previous version.
-
The partial definition block tags have been renamed to
partialdefandendpartialdef(fromstartpartialandendpartial) to better correspond to Django's naming conventions. (All the built-in tags follow the<name>end<name>pattern.)The old tag names are deprecated. A global search/replace for
startpartial/partialdefandendpartial/endpartialdefshould be sufficient to upgrade.Thanks to Justin Muncaster and Christian Tanul.
-
The opening
partialdeftag now accepts an optionalinlineargument, that enables you to output the partial at the same time as defining it for later use.{% partialdef my-great-partial inline=True %} ... {% endpartialdef %}This smooths initially wrapping an existing part of your page, as well as keeping the content inline, if that suits your case better.
Thanks to George Hickman.
Note: Passing
inline=Truehas been deprecated in 24.5. Only passinlineinstead. -
Adding
"template_partials"toINSTALLED_APPSwill now automatically configure the partials template loader.This means that you can remove the
TEMPLATES'OPTIONS''loaders'(and, likely, restoreAPP_DIRS: True) changes that you made when first installing template-partials.If you need more fine grained control over your template loaders, an alternative
AppConfigis available that will not automatically configure the loader.Please see the README for full details.
Thanks to Vinay Sajip.
-
The README documentation has been expanded and improved for this release. Please review that again to make sure you don't miss anything.
-
Thanks also in this release to Andreu Vallbona for miscellaneous small fixes.
- Fixed exception when rendering the Django debug view for a template error in a partial. Thanks to Harro van der Klauw.
- Initial release.