[Django]-Django Admin, Amazon S3, Heroku β€” missing icon_calendar

4πŸ‘

βœ…

The problem is not with boto, or with django-storages.

The problem is that the django admin is missusing the {% static %} tag. The static tag assumes (rightly) that it is viewing the entire url, and that it can modify that url arbitarily. By passing in only a prefix, the django admin is breaking that contract (which will not be detected in the simplest cases, but will be a big problem when you try to do anything more complex.

You should file a bug or patch against django to explicitly pass all asset urls, in full, to the static tag, and dump these full resource URIs into the javascript context.

EDIT: This solution should work for you:
http://code.larlet.fr/django-storages/issue/121/s3boto-admin-prefix-issue-with-django-14#comment-1604389

Just make sure you have AWS_QUERYSTRING_AUTH set to False, or you will get querystrings sandwiched in there.

πŸ‘€Thomas

Leave a comment