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.
Comment (by Mariusz Felisiak):
Duplicate of #32744.
--
Ticket URL: <https://code.djangoproject.com/ticket/32745#comment:1>
* status: new => closed
* resolution: => duplicate
--
Ticket URL: <https://code.djangoproject.com/ticket/32745#comment:2>
Comment (by Carlton Gibson):
Hi Riccardo — can you follow-up on #32744 please? As I wrote there, this
isn't currently reproducing for me. (Just tried again with a fresh
project, without luck, so more details are needed.) Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/32745#comment:3>
Comment (by Riccardo Di Virgilio):
Hi, sorry I was unable to find the duplicated ticket, where is it?
Thanks again.
--
Ticket URL: <https://code.djangoproject.com/ticket/32745#comment:4>
Comment (by Carlton Gibson):
Hi Riccardo, sorry I missed your comment: the main ticket is #32744.
There's a PR that should fix it, if you'd like to test at
https://github.com/django/django/pull/14407
Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/32745#comment:5>