{"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":[{"wrong":"from template_partials.templatetags import PartialTemplateTag","symbol":"PartialTemplateTag","correct":"from template_partials.templatetags 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,"search_vec":"'25.3':17 'activ':18 'current':15 'develop':19 'django':2,12,20 'django-template-parti':1 'inlin':8,23 'inline-parti':7 'languag':14 'name':6 'partial':4,9,22 'reusabl':5,24 'templat':3,13,21 'version':16","created_at":"2026-04-27T16:58:25.645778+00:00","updated_at":"2026-04-27T16:58:25.645778+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'PartialTemplateTag' from 'template_partials.templatetags' (/tmp/tmp8cybkedk/venv/lib/python3.12/site-packages/template_partials/templatetags/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"25.3","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/carltongibson/django-template-partials","docs":"https://github.com/carltongibson/django-template-partials?tab=readme-ov-file#basic-usage","changelog":"https://github.com/carltongibson/django-template-partials/blob/main/CHANGELOG.md","pypi":"https://pypi.org/project/django-template-partials/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}