Registry / web-framework / django-template-partials

django-template-partials

JSON →
library25.3pypypiunverified

Reusable named inline-partials for the Django Template Language. Current version 25.3. Active development.

pip install django-template-partials
INSTALL
IMPORT
SIG · DJANGO-TEMPLATE-PA
D
django-template-partials
web-frameworkpythonv25.3
Install
3.4s avg
Import
Disk
65MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v25.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 66.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.4s · import 0.000s · 67MB
65MB installed
● package 65MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PartialTemplateTag
from template_partials.templatetags import PartialTemplateTag
from template_partials.templatetags import PartialTemplateTag

Add 'template_partials' to INSTALLED_APPS, then use {% load partials %} and {% partial %} / {% endpartial %} in templates.

# settings.py INSTALLED_APPS = [ ... 'template_partials', ] # template.html (load the tag) {% load partials %} {% partial my_partial %} <p>Hello, {{ name }}!</p> {% endpartial %} {% partial my_partial %} <!-- rendered inline -->
Debug
Known issues
breakingBreaking change in 24.2: the partial name is now required ({% partial name %} instead of optional).
fix
Always provide a name for {% partial %} tags.
affects: >=24.2
deprecatedIn 24.3, the `as` keyword for calling partials is deprecated; use the partial directly via `{% partial my_partial %}` instead of `{% partial my_partial as var %}`.
fix
Remove `as var` from partial calls.
affects: >=24.3
gotchaPartials are not available in included templates unless you reload the tag library; you must call {% load partials %} again in the included template.
fix
Add {% load partials %} in each template where partials are used.
affects: all
Upgrade
Version history
25.3latest on PyPI · released Nov 14, 2025
Audit
Dependencies
djangorequiredRequires Django (any version, but partials work with Django 3.2+)
Agent activity
16 hits · last 30 days
node
16
Resources
django-template-partials — pip install django-template-partials · libregistry