reset_template_engines
Resets the template engine caches and configurations when specific Django settings like TEMPLATES, DEBUG, or INSTALLED_APPS are modified. This function clears internal engine states and resets default renderers to ensure configuration changes are reflected immediately.
def reset_template_engines(
setting: string,
**kwargs: dict
) - > null
Resets the internal caches of Django's template engines and form renderers when relevant settings are modified. This ensures that changes to TEMPLATES, DEBUG, or INSTALLED_APPS are reflected immediately by clearing the cached engine instances and default renderer configurations.
Parameters
| Name | Type | Description |
|---|---|---|
| setting | string | The name of the Django setting that was changed, used to determine if a cache reset is necessary. |
| **kwargs | dict | Additional keyword arguments passed by the setting_changed signal receiver. |
Returns
| Type | Description |
|---|---|
null | Nothing is returned; the function performs in-place cache invalidation. |