Opened 13 years ago
Closed 13 years ago
#18111 closed Uncategorized (invalid)
Django autoreload doesn't work for forms.py or tests.py in my app (but does for models.py)
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Uncategorized | Version: | 1.4 |
Severity: | Normal | Keywords: | autoreload |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I've created a django app that I use within my site. When I change it's models.py reload happens, however for forms.py and tests.py it does not.
Change History (4)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Putting the following code into MY_APP/init.py works as a workaround, although doesn't seem ideal:
try: import forms except: pass
comment:3 by , 13 years ago
Last bit of info for now - here's the (not recommended) init.py I came up with to reload forms and tests automatically:
try: from django.conf import settings if settings.DEBUG: import forms, tests except: pass
comment:4 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
By design, the development server only reloads code that it's actually using.
If forms.py isn't used, what's the point in reloading the development server when it's changed?
Note:
If I open autoreload.py and put the following code
I can see all my and djangos models, also forms it' uses, but none from my app: