Changes between Initial Version and Version 1 of Ticket #34692


Ignore:
Timestamp:
Jul 3, 2023, 10:32:36 AM (16 months ago)
Author:
Andrew
Comment:

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  
    55However, 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.
    66
    7 A simple fix can be demonstrated by changing reset_loaders() to the following:
     7A crude fix can be demonstrated by changing reset_loaders() to the following:
    88
    99{{{
Back to Top