Changes between Initial Version and Version 1 of Ticket #34692
- Timestamp:
- Jul 3, 2023, 10:32:36 AM (16 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #34692
- Property Summary django.forms.get_default_renderer()'s template loader cache is not being reset on autoloads. → django.forms.renderers.get_default_renderer()'s template loader cache is not being reset on autoloads.
-
Ticket #34692 – Description
initial v1 5 5 However, Django's renderer for Forms uses forms.renderers.get_default_renderer(), which returns a mixin that has its own engine instance, and therefore its own loaders (and template caches). This engine is never reset on autoloads. This means that any changes to a template that is referenced as part of, EG "Form.template_name", is never refreshed on changes. The entire runserver process must be restarted for any templates cached through forms.renders to be reloaded. This is tedious and does not match the behavior seen by non-form cached templates. 6 6 7 A simple fix can be demonstrated by changing reset_loaders() to the following:7 A crude fix can be demonstrated by changing reset_loaders() to the following: 8 8 9 9 {{{