#18455: Form media rendering doesn't respect STATICFILES_STORAGE
------------------------+--------------------------------------
     Reporter:  djw     |                    Owner:  nobody
         Type:  Bug     |                   Status:  new
    Component:  Forms   |                  Version:  master
     Severity:  Normal  |               Resolution:
     Keywords:          |             Triage Stage:  Unreviewed
    Has patch:  0       |      Needs documentation:  0
  Needs tests:  0       |  Patch needs improvement:  0
Easy pickings:  0       |                    UI/UX:  0
------------------------+--------------------------------------
Changes (by djw):

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


Comment:

 I've created a patch here:

 https://github.com/djw/django/tree/ticket_18455

 All the tests in 'forms' pass with this patch applied. However, they fail
 when running as part of the full test suite, and I need some advice on how
 to fix this.

 The issue is that the tests in forms/tests/media.py run with overridden
 STATIC_URL and MEDIA_URL. When run in isolation, the static files storage
 backend is initialised based on these settings. However if the backend has
 been initialised before these tests run, it doesn't respect the new values
 of STATIC_URL and MEDIA_URL, so the tests fail. What's the best way to go
 about fixing this?

 Also the `absolute_path()` method has an optional `prefix` argument — I
 can't see where that's used, so I dont know how to support it properly.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18455#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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to