[Answer]-Using same static folder on multiple django sites

0👍

AdamKG gave me the “right” answer – at least for my needs.
I might move to S3 at some point, when it’s more relevant.

“Well, the easy hacks are symlinks & related. The question you should be asking, though, is why you’re using django projects as a unit of what seems to be (going by count ~ 200) a commodity. IOW: why do the sites have separate anything, including static media, instead of just being rows in a table? “

1👍

In a situation like this, I would use Amazon S3 and CloudFront. You can transparently upload all of your static files to your S3 bucket using django-storages when you run collect static by replacing the default file upload mechanism with boto + s3 as such:

DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'

As @AdamKG stated, if all of these sites share the same code, with different content, you’re probably better off using Django-CMS or moving these sites to database records rather than deploying the same code over and over.

Leave a comment