#32745: Django 3.2 is auto reloading when template files are changed
------------------------------------------------+------------------------
               Reporter:  Riccardo Di Virgilio  |          Owner:  nobody
                   Type:  Bug                   |         Status:  new
              Component:  Template system       |        Version:  3.2
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  1
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 The new version of Django 3.2 is forcing the auto reloading of all
 templates files, and there is no way to switch this feature off.
 For development I don't used any cached reloader and the legacy strategy
 of not reloading the server on template changes worked quite well for
 several years.
 When upgrading to Django 3.2 people working with me started complaining
 that any tiny change in html is now forcing the project to auto reload,
 this might not seems a big deal on a small project, but on a project of
 the size I'm working on it takes several seconds to reload.

 Unfortunately the current implementation is automatically opting you in
 here if you use Django templates:

 https://github.com/django/django/blob/main/django/template/autoreload.py#L9

 And there is no way to turn this off, so I needed to switch back to Django
 3.1 because this slowdown while developing is a dealbreaker for us.

 I'm proposing 2 ways of fixing this:

 1. A setting under TEMPLATES
 2. Instead of checking if the class has a method named get_dirs, check if
 there is a property called "should_autoreload", this way I can at least
 subclass the loader and disable it.

 I can contribute if you need, I have already done some small contributions
 I would be happy to help here.

 Thanks.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32745>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.dd1c470d21341ec97d753afea31296c2%40djangoproject.com.

Reply via email to