When Django 6.0 includes template partials functionality in core, you'll need to migrate your existing django-template-partials implementation. Follow these steps:
Remove "template_partials" (or "template_partials.apps.SimpleAppConfig") from your INSTALLED_APPS:
# Before
INSTALLED_APPS = [
"template_partials", # Remove this line
"django.contrib.admin",
# ... other apps
]
# After
INSTALLED_APPS = [
"django.contrib.admin",
# ... other apps
]If you manually configured the template loader or added partials to builtins, remove these configurations:
# Remove from TEMPLATES OPTIONS if present
OPTIONS = {
"builtins": [
"template_partials.templatetags.partials", # Remove this line
],
}
# Remove custom loader configurations if you used wrap_loaders() or manual setup
# loaders = [("template_partials.loader.Loader", cached_loaders)] # RemoveRemove {% load partials %} from all your templates since partials is built-in:
<!-- Before -->
{% load partials %} {% partialdef my-partial %}
<!-- content -->
{% endpartialdef %}
<!-- After -->
{% partialdef my-partial %}
<!-- content -->
{% endpartialdef %}Remove the package from your environment:
pip uninstall django-template-partialsAnd remove it from your requirements.txt, pyproject.toml, or other dependency files.
⚠️ Test your templates thoroughly after migration- 📖 Check Django 6.0 release notes for any syntax changes or new features
- ✅ All existing functionality should work: partials, inline partials, and context handling