richleland/django-cumulus — Issue #32: Upload to a configurable root path instead of STATIC_URL
Author: poswald
Created: 2011-12-19 10:01:21+00:00
State: open

It seems to me that django-cumulus needs a way to handle absolute urls being specified. It is legal to have a [static url setting](https://docs.djangoproject.com/en/dev/ref/settings/#static-url) like:

STATIC_URL = "http://mycdn.com/static/"

However, if you do this and run `/manage.py syncstatic -v 2` you can see that it uploads to the container:

$ ./manage.py syncstatic -v 2 -t
Uploaded http://mycdn.com/static/500.html
Uploaded http://mycdn.com/static/favicon.ico
Uploaded http://mycdn.com/static/admin/css/base.css
....

This is really not what you want because it goes into the CDN server's container under `my container/http://mycdn.com/static/500.html`

When you think about it, you're not uploading to a URL, but to a path. I suggest having a `CUMULUS_ROOT` setting so that we can specify where to upload to. It can be made backwards compatible by defaulting to `/static/` but people can then change it if they specify absolute urls.