Changes between Initial Version and Version 9 of Ticket #25598
- Timestamp:
- 07/21/16 14:19:45 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #25598
- Property Cc kottenator@… added
-
Property
Triage Stage
changed from
Unreviewed
toAccepted
-
Property
Component
changed from
Uncategorized
tocontrib.staticfiles
-
Property
Summary
changed from
support for SCRIPT_NAME for static tag and FileField.url
toAdd 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.1 By 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. 2 2 3 This problem can be solved with appending `SCRIPT_NAME` in to `SCRIPT_URL` in `settings.py`3 This 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''. 4 4 5 This can be easily added into default django `static` tag and `django.contrib.staticfiles` tag as following: 6 5 This can be easily added into default Django `static` tag and `django.contrib.staticfiles` tag as following: 7 6 8 7 {{{ … … 16 15 }}} 17 16 18 On more research I found that `FileSystemStorage` and `StaticFilesStorage` ignores `script_name` as well. 17 On more research I found that `FileSystemStorage` and `StaticFilesStorage` ignores `SCRIPT_NAME` as well. 18 19 19 We might have to do a lot of changes but I think it's worth the efforts.