I use amazon s3 to store static files and django-compressor to compress js and css files with COMPRESS_OFFLINE = True
.
To deploy to my production server, I first run python manage.py compress
, which uploads the compressed files to Amazon s3 and then do a git push to my repo. At the production server, I pull from this repo and I always encounter synchronization problem between for the generated css and js files.
I search possibilities and noticed that compressor actually looks at the modified time of compressed files. When I check the modified date between static files in my static folder of my app (not S3 files), I noticed that they are different, I believe the reason is git changes the modified date of changed files.
How can I fix this?
Thanks