Re: [Django] #19295: runserver --insecure doesn't work with DEBUG False and CachedStaticFilesStorage

2012-11-22 Thread Django
#19295: runserver --insecure doesn't work with DEBUG False and
CachedStaticFilesStorage
--+
 Reporter:  Apreche   |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.staticfiles   |  Version:  1.4
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by jezdez):

 * type:  Bug => Cleanup/optimization
 * stage:  Design decision needed => Accepted


Comment:

 I'm pretty sure you're way out of scope for both runserver and the
 CachedStaticFilesStorage. So to answer your question, to fix this "bug"
 stop using --insecure in the first place.

 I'm accepting this ticket to warn users in the docs that both modes are
 incompatible.

-- 
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 https://groups.google.com/groups/opt_out.




Re: [Django] #19295: runserver --insecure doesn't work with DEBUG False and CachedStaticFilesStorage

2012-11-16 Thread Django
#19295: runserver --insecure doesn't work with DEBUG False and
CachedStaticFilesStorage
-+-
 Reporter:  Apreche  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.staticfiles  |  Version:  1.4
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Design
Has patch:  0|  decision needed
  Needs tests:  0|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by aaugustin):

 * needs_better_patch:   => 0
 * stage:  Unreviewed => Design decision needed
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 I can reproduce the issue, but I don't know how to fix it.

-- 
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 https://groups.google.com/groups/opt_out.




Re: [Django] #19295: runserver --insecure doesn't work with DEBUG False and CachedStaticFilesStorage

2012-11-14 Thread Django
#19295: runserver --insecure doesn't work with DEBUG False and
CachedStaticFilesStorage
-+-
 Reporter:  Apreche  |Owner:  nobody
 Type:  Bug  |   Status:  reopened
Component:  contrib.staticfiles  |  Version:  1.4
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
Has patch:  0|  Unreviewed
  Needs tests:  0|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by anonymous):

 * status:  closed => reopened
 * resolution:  fixed =>


-- 
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 https://groups.google.com/groups/opt_out.




Re: [Django] #19295: runserver --insecure doesn't work with DEBUG False and CachedStaticFilesStorage

2012-11-14 Thread Django
#19295: runserver --insecure doesn't work with DEBUG False and
CachedStaticFilesStorage
-+-
 Reporter:  Apreche  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  contrib.staticfiles  |  Version:  1.4
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:
Has patch:  0|  Unreviewed
  Needs tests:  0|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by anonymous):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => fixed
 * needs_tests:   => 0
 * needs_docs:   => 0


-- 
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 https://groups.google.com/groups/opt_out.




[Django] #19295: runserver --insecure doesn't work with DEBUG False and CachedStaticFilesStorage

2012-11-14 Thread Django
#19295: runserver --insecure doesn't work with DEBUG False and
CachedStaticFilesStorage
-+
 Reporter:  Apreche  |  Owner:  nobody
 Type:  Bug  | Status:  new
Component:  contrib.staticfiles  |Version:  1.4
 Severity:  Normal   |   Keywords:
 Triage Stage:  Unreviewed   |  Has patch:  0
Easy pickings:  0|  UI/UX:  0
-+
 How to reproduce:

 Enable the CachedStaticFilesStorage in your settings and turn DEBUG off.

 {{{
 DEBUG = False

 STATICFILES_STORAGE =
 'django.contrib.staticfiles.storage.CachedStaticFilesStorage'
 }}}

 Turn on the runserver with the insecure flag

 {{{ $ python manage.py runserver --insecure }}}

 Visit your runserver in your browser, and the static files will not load.
 When using the default
 django.contrib.staticfiles.storage.StaticFilesStorage the static files
 will load.

 The reason is because of this section in contrib/staticfiles.storage.py

 {{{
 100 def url(self, name, force=false):
 101 """
 102 Returns the real URL in DEBUG mode.
 103 """
 104 if settings.DEBUG and not force:
 105 hashed_name, fragment = name, ''
 106 else:
 }}}

 When DEBUG is False, the automatic static file serving in runserver is
 disabled. But using runserver with --insecure will re-enable it. Because
 the CachedStaticFilesStorage only looks at the DEBUG flag, it will not
 work properly in this scenario. Perhaps that force parameter could be set
 to True when the --insecure flag is passed to runserver?

 Yes, this is an extremely rare and low-priority edge case, but still a
 bug.

 It's also not clear what the expected behavior is when both the --nostatic
 and --insecure flags are passed to runserver simultaneously. They sort of
 cancel each other out. Personally I feel the nostatic should take
 priority.

-- 
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 https://groups.google.com/groups/opt_out.