Changes between Initial Version and Version 9 of Ticket #25598


Ignore:
Timestamp:
07/21/16 14:19:45 (6 years ago)
Author:
Rostyslav Bryzgunov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25598

    • Property Cc kottenator@… added
    • Property Triage Stage changed from Unreviewed to Accepted
    • Property Component changed from Uncategorized to contrib.staticfiles
    • Property Summary changed from support for SCRIPT_NAME for static tag and FileField.url to Add support for SCRIPT_NAME in STATIC_URL and MEDIA_URL
  • Ticket #25598 – Description

    initial v9  
    1 By default, `static` tag just appends `STATIC_URL` in the path. When running on subpath it results in incorrect static url.
     1By default, `{% static '...' %}` tag just appends `STATIC_URL` in the path. When running on sub-path, using `SCRIPT_NAME` WSGI param, it results in incorrect static URL - it doesn't prepend `SCRIPT_NAME` prefix.
    22
    3 This problem can be solved with appending `SCRIPT_NAME` in to `SCRIPT_URL` in `settings.py`
     3This problem can be solved with prepending `SCRIPT_NAME` in to `SCRIPT_URL` in `settings.py` but that doesn't work when `SCRIPT_NAME` is a ''dynamic value''.
    44
    5 This can be easily added into default django `static` tag and `django.contrib.staticfiles` tag as following:
    6 
     5This can be easily added into default Django `static` tag and `django.contrib.staticfiles` tag as following:
    76
    87{{{
     
    1615}}}
    1716
    18 On more research I found that `FileSystemStorage` and `StaticFilesStorage` ignores `script_name` as well.
     17On more research I found that `FileSystemStorage` and `StaticFilesStorage` ignores `SCRIPT_NAME` as well.
     18
    1919We might have to do a lot of changes but I think it's worth the efforts.
Back to Top