#36495: Bug in determining if template file should be autoreloaded in
`django.utils.autoreload.notify_file_changed` ?
-------------------------------------+-------------------------------------
     Reporter:  Dominika             |                    Owner:  (none)
         Type:  Bug                  |                   Status:  new
    Component:  Utilities            |                  Version:  5.2
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  templates,autoreload,watcher,filewatcher|  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by David Sanders):

 * component:  Uncategorized => Utilities

Comment:

 Thanks for the report, though a couple of things:

  - runserver doesn't need to be reloaded for a template change, templates
 should just be reread
  - the code you referred to seems counter-intuitive and confusing
  - out of curiosity, I removed the `not` and ran the test suite and it all
 passed

 I 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 `.py`
 file in the templates directory, hence the `return (None)` when the
 filename ends with `.py`.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36495#comment:1>
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 visit 
https://groups.google.com/d/msgid/django-updates/01070197e36f2a55-a2cd3408-6b73-4f0a-b033-362c28d06250-000000%40eu-central-1.amazonses.com.

Reply via email to