> > On Mon, Oct 1, 2012 at 12:47 AM, Jannis Leidel <lei...@gmail.com> wrote: > Then, frankly, this is a problem of the storage backends, not Django's. > The S3BotoStorage backend *does* have a modified_time method: > > > https://bitbucket.org/david/django-storages/src/1574890d87be/storages/backends/s3boto.py#cl-298 > > What storage backend do you use that doesn't have a modified_time method? >
I don't think you're seeing the problem I'm having. I'm working with a distributed team using git. This means when we check out files, the local modified time is the time at which I checked the files out, not the time which the files were actually last modified. As a result, it's a questionable metric for figuring out if a file is the same or not, since every team member's local machine thinks they were all just created! We end up re-uploading the file every time. > This is a bit confusing...why call it last_modified when that's doesn't > necessarily reflect what it's doing? It would be more flexible to create > two methods: > > It's called modified_time, not last_modified. > Sorry, typo. > > > def modification_identifier(self): > > > > def has_changed(self): > > > > Then, any backend could implement these however they might like, and > collectstatic would have no excuse in uploading the same file more than > once. Overloading last_modified to also do things like calculate md5's > seems a bit hacky to me, and confusing for any developer maintaining a > custom storage backend that doesn't support last modified. > > I disagree, modified_time is perfectly capable of handling your use case. > No it does not address my needs, as I described above. Dan -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.