Opened 4 months ago
Closed 4 months ago
#36495 closed New feature (wontfix)
Template file changes do not trigger a server reload
| Reported by: | Dominika | Owned by: | |
|---|---|---|---|
| Component: | Utilities | Version: | 5.2 |
| Severity: | Normal | Keywords: | templates, autoreload, watcher, filewatcher |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
This line checks for not any
https://github.com/django/django/blame/6df19412aabb7d969f5eab4b2ff41269de89b233/django/utils/autoreload.py#L371
But this line returns True for templates:
That's why changing template files does not trigger server autoreload.
Change History (2)
comment:1 by , 4 months ago
| Component: | Uncategorized → Utilities |
|---|
comment:2 by , 4 months ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
| Summary: | Bug in determining if template file should be autoreloaded in `django.utils.autoreload.notify_file_changed` ? → Template file changes do not trigger a server reload |
| Type: | Bug → New feature |
Given #32744, I don't believe this is desired behavior
Changes to behavior need to be proposed and discussed with the community. To do that, please raise this on the new feature tracker.
Note:
See TracTickets
for help on using tickets.
Thanks for the report, though a couple of things:
notand ran the test suite and it all passedI think there may be some clarification that's required here, and possibly a test written (because any change to code should break a test somewhere, somehow) but I don't think any change is necessary from my first point above.
I believe what that is supposed to do is reload, only if there's a
.pyfile in the templates directory, hence thereturn (None)when the filename ends with.py.