Very interesting post. I've been looking for an automated way to handle the file renames, compression, etc. in my setup. Currently I have an nginx load balancer sitting in front of django/apache app servers. nginx is also serving the static content so that apache does not have to worry about it. How would this solution work inside of that infrastructure since the nginx balancer doesn't even have Django running on it? Would it be a simple matter of adding another step to the build to transfer the stamped files to the nginx servers?
That would indeed require some upgrades to django-static as it's currently not able to write across the network.
It's not just that but some people might want to have the files written to a CDN which would be different every time so the best approach would be to write something that makes it possible to define a function or something that takes care of the network write or network copy. In a future version maybe.
Comment
Very interesting post. I've been looking for an automated way to handle the file renames, compression, etc. in my setup. Currently I have an nginx load balancer sitting in front of django/apache app servers. nginx is also serving the static content so that apache does not have to worry about it. How would this solution work inside of that infrastructure since the nginx balancer doesn't even have Django running on it? Would it be a simple matter of adding another step to the build to transfer the stamped files to the nginx servers?
Replies
That would indeed require some upgrades to django-static as it's currently not able to write across the network.
It's not just that but some people might want to have the files written to a CDN which would be different every time so the best approach would be to write something that makes it possible to define a function or something that takes care of the network write or network copy. In a future version maybe.