{"id":21166,"library":"django-template-partials","title":"django-template-partials","description":"Reusable named inline-partials for the Django Template Language. Current version 25.3. Active development.","status":"active","version":"25.3","language":"python","source_language":"en","source_url":"https://github.com/carltongibson/django-template-partials/","tags":["django","template","partials","inline","reusable"],"install":[{"cmd":"pip install django-template-partials","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Requires Django (any version, but partials work with Django 3.2+)","package":"django","optional":false}],"imports":[{"note":"","symbol":"PartialTemplateTag","correct":"from template_partials import PartialTemplateTag"}],"quickstart":{"code":"# settings.py\nINSTALLED_APPS = [\n    ...\n    'template_partials',\n]\n\n# template.html (load the tag)\n{% load partials %}\n\n{% partial my_partial %}\n<p>Hello, {{ name }}!</p>\n{% endpartial %}\n\n{% partial my_partial %}\n<!-- rendered inline -->","lang":"python","description":"Add 'template_partials' to INSTALLED_APPS, then use {% load partials %} and {% partial %} / {% endpartial %} in templates."},"warnings":[{"fix":"Always provide a name for {% partial %} tags.","message":"Breaking change in 24.2: the partial name is now required ({% partial name %} instead of optional).","severity":"breaking","affected_versions":">=24.2"},{"fix":"Remove `as var` from partial calls.","message":"In 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 %}`.","severity":"deprecated","affected_versions":">=24.3"},{"fix":"Add {% load partials %} in each template where partials are used.","message":"Partials are not available in included templates unless you reload the tag library; you must call {% load partials %} again in the included template.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Add 'template_partials' to INSTALLED_APPS in settings.py.","cause":"Missing the app in INSTALLED_APPS.","error":"'template_partials' is not a registered tag library. Must be one of: ..."},{"fix":"Use {% partial my_partial %} with the exact partial name defined earlier.","cause":"Calling {% partial %} without a name (or with `as` variable) in newer versions.","error":"TemplateSyntaxError: 'partial' tag requires exactly one argument (the partial name)"},{"fix":"Ensure {% load partials %} is present in every template that uses partials.","cause":"Partials are only available in the same template where defined, or in included templates that reload the tag library.","error":"TemplateDoesNotExist: ... no idea why partials not rendering"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}