Re: [Django] #18111: Django autoreload doesn't work for forms.py or tests.py in my app (but does for models.py)

2012-04-12 Thread Django
#18111: Django autoreload doesn't work for forms.py or tests.py in my app (but 
does
for models.py)
---+--
 Reporter:  stu.axon@… |Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  Uncategorized  |  Version:  1.4
 Severity:  Normal |   Resolution:  invalid
 Keywords:  autoreload | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by aaugustin):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 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?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #18111: Django autoreload doesn't work for forms.py or tests.py in my app (but does for models.py)

2012-04-12 Thread Django
#18111: Django autoreload doesn't work for forms.py or tests.py in my app (but 
does
for models.py)
---+--
 Reporter:  stu.axon@… |Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Uncategorized  |  Version:  1.4
 Severity:  Normal |   Resolution:
 Keywords:  autoreload | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by stu.axon@…):

 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
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #18111: Django autoreload doesn't work for forms.py or tests.py in my app (but does for models.py)

2012-04-12 Thread Django
#18111: Django autoreload doesn't work for forms.py or tests.py in my app (but 
does
for models.py)
---+--
 Reporter:  stu.axon@… |Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Uncategorized  |  Version:  1.4
 Severity:  Normal |   Resolution:
 Keywords:  autoreload | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by stu.axon@…):

 Putting the following code into MY_APP/__init__.py works as a workaround,
 although doesn't seem ideal:


 {{{
 try:
   import forms
 except:
   pass

 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #18111: Django autoreload doesn't work for forms.py or tests.py in my app (but does for models.py)

2012-04-12 Thread Django
#18111: Django autoreload doesn't work for forms.py or tests.py in my app (but 
does
for models.py)
---+--
 Reporter:  stu.axon@… |Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Uncategorized  |  Version:  1.4
 Severity:  Normal |   Resolution:
 Keywords:  autoreload | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by stu.axon@…):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 Note:

 If I open autoreload.py and put the following code

 {{{

 if filename.endswith("models.py"):
 print 'MODEL: ', filename
 elif filename.endswith("forms.py"):
 print 'FORM: ', filename
 }}}


 I can see all my and djangos models, also forms it' uses, but none from my
 app:


 {{{
 MODEL:  /python2.7/site-packages/django/contrib/staticfiles/models.py
 FORM:  /python2.7/site-packages/django/contrib/auth/forms.py
 MODEL:  /python2.7/site-packages/compressor/models.py
 MODEL:  /python2.7/site-packages/django/contrib/messages/models.py
 MODEL:  /python2.7/site-packages/django/contrib/sites/models.py
 MODEL:  ~/projects/jpc/git/MY_SITE/MY_APP/calendar_models.py
 MODEL:  /python2.7/site-packages/django/contrib/formtools/models.py
 MODEL:  /python2.7/site-packages/django/contrib/auth/models.py
 FORM:  /python2.7/site-packages/django/forms/forms.py
 MODEL:  /python2.7/site-packages/django/contrib/admin/models.py
 MODEL:  ~/projects/jpc/git/MY_SITE/MY_APP/models.py
 MODEL:  /python2.7/site-packages/django/contrib/contenttypes/models.py

 MODEL:  /python2.7/site-packages/debug_toolbar/models.py
 MODEL:  /python2.7/site-packages/django/forms/models.py
 MODEL:  /python2.7/site-packages/django/contrib/sessions/models.py
 FORM:  /python2.7/site-packages/django/contrib/admin/forms.py

 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #18111: Django autoreload doesn't work for forms.py or tests.py in my app (but does for models.py)

2012-04-12 Thread Django
#18111: Django autoreload doesn't work for forms.py or tests.py in my app (but 
does
for models.py)
---+
 Reporter:  stu.axon@… |  Owner:  nobody
 Type:  Uncategorized  | Status:  new
Component:  Uncategorized  |Version:  1.4
 Severity:  Normal |   Keywords:  autoreload
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  0  |  UI/UX:  0
---+
 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.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.