I'm with you, if not on 100% of what you said, at least 95% of it :)
> That said, if throwing directory deleting out
> is the thing that's required to get the patch in, I won't object ;)
I just foresee that if there is heavy hesitation on even deleting
files, deleting directories might be too liberal a feature for the
kind of position that the framework takes. I don't doubt that
directory deletion has its use, and that it's safe when used
properly. I think that the primary committors (of which I am most
certainly not) would not think that it was a critical piece of the
framework. So that being said, I'm just folding on that one without
any argument
> It never occurred to me that we would not a least want the option to
> delete the file from disk. I would guess that in 95% of projects
> people have exactly one FileField in charge of a particular file.
And that's where this patch has an excellent point. Like I kicked
things off by saying, letting Django help out and delete a file is
hardly different than me hacking in a blind file deletion and
'pass'ing on the exception. I don't think that anybody can argue that
there shouldn't at least be the checkbox for "clear this field", even
if the file *isn't* deleted. But, without the ability to actually
remove the file, I'm unsure that we can say that the FileField and its
derivatives are doing 100% of the job that I'm sure a lot of us expect
it to do.
For the sake of bringing the real-world use case into the picture,
I've got an admin change form which has a few FileFields for various
uses, such as cover letter documents, email lists, etc. I discard the
original file name in favor of something streamlined, like
"email_list.csv". Pretty reasonable. But even the smartest system
admin sitting next to me can't do anything about the utterly useless
duplicate files that pile up on the remote server, without some SSH
credentials.
So, where the core developers and decision makers might hesitate to
delete a file that I declare useless, this patch would instead pick up
the slack. The files left behind are 100% useless if I say so.
Consider me using a hosted solution, where I can't be bothered with
logging in each week and clearing abandoned files out of a folder.
The typical "set up a cron job" (or similar) approach doesn't work in
every case.
> This was classified as
> "Small/just bugs" when deciding on features for 1.1 by the way [2].
If that's the case, then that's find it it waits until bugfix phase.
I had thought it to be a feature addition, but I'll adjust my
understanding accordingly!
I hope that a patch which has predated version 1.0 can at last get a
decision made. I'm of course bias toward it being implemented very
nearly as-is, but a decision is at least a decision.
*peacefully waiting for bugfix phase*
Tim
> [1]
http://groups.google.com/group/django-developers/browse_thread/thread...
> [2]
http://code.djangoproject.com/wiki/Version1.1Features