Skip to main content

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

NameTypeDescription
settingstringThe name of the Django setting that was changed, used to determine if a cache reset is necessary.
**kwargsdictAdditional keyword arguments passed by the setting_changed signal receiver.

Returns

TypeDescription
nullNothing is returned; the function performs in-place cache invalidation.