I just talked about this with Mike on IRC; I think chunk() is
non-obvious and we're gonna change it to chunks(). Hopefully nobody's
written so much code in the last week to be pissed.
Also, we're going to change UploadedFile.file_name to
UploadedFile.name to more closely match the built-in file API.
Sorry about not thinking this through fully before committing, but
it's gonna be better this way.
Jacob
Well, as long as the floor's open, I'd like to make sure file storage
code is consistent. Currently, it uses filename instead of file_name
or just name, and it also uses size instead of file_size. I assume I
should go with name instead of filename, but should I use file_size,
or should the upload stuff use size?
On a related note, when merging #5361 with the new trunk, should the
file-related code, such as moving files and whatnot, be moved into
django.core.filestorage.filesystem? Also, should the code in
django.core.filestorage be moved over to the new django.core.files
package instead?
So many bikesheds, so little time.
-Gul
Yeah, let's be consistent and use "size" and "name" everywhere. In
retrospect that beginning "file_" was redundant; my bad, sorry to have
to change it!
> On a related note, when merging #5361 with the new trunk, should the
> file-related code, such as moving files and whatnot, be moved into
> django.core.filestorage.filesystem? Also, should the code in
> django.core.filestorage be moved over to the new django.core.files
> package instead?
Let's put everything file-related in django.core.files -- no need for
both locations. We won't include support for any particular
network-based file storage in django.core (that'd go in contrib,
maybe) so there's no need to qualify the filesystem part.
Jacob