Feature request: collectstatic shouldn't recopy files that already exist in destination

2012-09-27 Thread Dan Loewenherz
Hey all! This is a feature request / proposal (one which I'm willing to build out, given that I've already developed a solution for my own uploader). I run a consulting business that helps small startups build initial MVPs. When the time ultimately comes to deciding how to store static assets, my

Re: Feature request: collectstatic shouldn't recopy files that already exist in destination

2012-09-27 Thread Dan Loewenherz
nning it on multiple computers). Dan On Thu, Sep 27, 2012 at 3:12 PM, Karen Tracey wrote: > On Thu, Sep 27, 2012 at 12:51 PM, Dan Loewenherz wrote: > >> The problem I've run into is that collectstatic copies all files, >> regardless of whether they already exist on the des

Re: Feature request: collectstatic shouldn't recopy files that already exist in destination

2012-09-27 Thread Dan Loewenherz
On Thu, Sep 27, 2012 at 4:13 PM, Carl Meyer wrote: > Hi Dan, > > On 09/27/2012 04:47 PM, Dan Loewenherz wrote: > > Just updated the ticket. > > > > As I commented, the heuristic for checking if a file has been modified > > lies in line 282 of collectstatic.py:

Re: Feature request: collectstatic shouldn't recopy files that already exist in destination

2012-09-30 Thread Dan Loewenherz
I think it's an API limitation. Many backends don't support last modified times, and even if they all did, it's incorrect to assume that last modified time is an accurate heuristic for whether a file has already been uploaded or not. It might be a better idea to let the backends decide when a file

Re: Feature request: collectstatic shouldn't recopy files that already exist in destination

2012-10-06 Thread Dan Loewenherz
Hey Jannis, On Mon, Oct 1, 2012 at 12:47 AM, Jannis Leidel wrote: > > On 30.09.2012, at 23:41, Dan Loewenherz wrote: > > > Many backends don't support last modified times, and even if they all > did, it's incorrect to assume that last modified time is an accurate &g

Re: Feature request: collectstatic shouldn't recopy files that already exist in destination

2012-10-07 Thread Dan Loewenherz
This issue just got me again tonight, so I'll try to push once more on this issue. It seems right now most people don't care that this is broken, which is a bummer, but in which case I'll just continue using my working solution. Dan On Sat, Oct 6, 2012 at 10:48 AM, Dan Loewenherz

Re: Feature request: collectstatic shouldn't recopy files that already exist in destination

2012-10-08 Thread Dan Loewenherz
> > On Mon, Oct 1, 2012 at 12:47 AM, Jannis Leidel 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

Re: Feature request: collectstatic shouldn't recopy files that already exist in destination

2012-10-08 Thread Dan Loewenherz
On Mon, Oct 8, 2012 at 3:50 AM, Jannis Leidel wrote: > You're able to ask S3 for the date of last modification, I don't see why a > comparison by hashing the file content is needed additionally. It'd have to > download the full file to do that on Django's side and I'm not aware of a > API for get