Changes between Initial Version and Version 9 of Ticket #25598


Ignore:
Timestamp:
Jul 21, 2016, 9:19:45 AM (8 years ago)
Author:
Rostyslav Bryzgunov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25598

    • Property Component Uncategorizedcontrib.staticfiles
    • Property Triage Stage UnreviewedAccepted
    • Property Summary support for SCRIPT_NAME for static tag and FileField.urlAdd support for SCRIPT_NAME in STATIC_URL and MEDIA_URL
    • Property Cc kottenator@… added
  • 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