#17857: CachedFilesMixin url_converter creates unnecessarily absolute urls
-------------------------------------+--------------------
     Reporter:  tgecho               |      Owner:  nobody
         Type:  Bug                  |     Status:  new
    Component:  contrib.staticfiles  |    Version:  SVN
     Severity:  Normal               |   Keywords:
 Triage Stage:  Unreviewed           |  Has patch:  0
Easy pickings:  0                    |      UI/UX:  0
-------------------------------------+--------------------
 The url converter outputs absolute urls, even if they were originally
 defined as relative. If I do a collectstatic while DEBUG=True, it uses my
 local dev STATIC_URL.

 So url("../img/shadow.png") becomes
 url("/static/img/shadow.96b0bd7b6268.png")

 Only my production STATIC_URL is 'http://mystatic.s3.amazonaws.com/' so
 this link is broken when DEBUG=False

 That's just a symptom of the problem that the url converter bakes in
 whatever STATIC_URL is in effect when collectstatic is run. If the final
 result was a relative path, then it would work wherever the static files
 ended up living. So ideally url("../img/shadow.png") becomes
 url(".../img/shadow.96b0bd7b6268.png"). This file would be portable no
 matter what the STATIC_URL is set to.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17857>
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