Google Groups Home
Help | Sign in
UploadedFile API changes (was: Is it UploadedFile.chunks() or .chunk() ?)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Jacob Kaplan-Moss  
View profile
 More options Jul 3, 12:22 pm
From: "Jacob Kaplan-Moss" <jacob.kaplanm...@gmail.com>
Date: Thu, 3 Jul 2008 11:22:53 -0500
Local: Thurs, Jul 3 2008 12:22 pm
Subject: UploadedFile API changes (was: Is it UploadedFile.chunks() or .chunk() ?)

On Thu, Jul 3, 2008 at 11:08 AM, Luke Plant <L.Plant...@cantab.net> wrote:
> The docs say '.chunks()' , which makes more sense to me, but the code
> says '.chunk()' (2 * for implementation,  1 * used)

> It's not too late to fix the code, otherwise the docs need changing.

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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marty Alchin  
View profile
 More options Jul 3, 1:03 pm
From: "Marty Alchin" <gulop...@gamemusic.org>
Date: Thu, 3 Jul 2008 13:03:27 -0400
Local: Thurs, Jul 3 2008 1:03 pm
Subject: Re: UploadedFile API changes (was: Is it UploadedFile.chunks() or .chunk() ?)
On Thu, Jul 3, 2008 at 12:22 PM, Jacob Kaplan-Moss

<jacob.kaplanm...@gmail.com> wrote:
> 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.

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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jacob Kaplan-Moss  
View profile
 More options Jul 3, 2:18 pm
From: "Jacob Kaplan-Moss" <ja...@jacobian.org>
Date: Thu, 3 Jul 2008 13:18:08 -0500
Local: Thurs, Jul 3 2008 2:18 pm
Subject: Re: UploadedFile API changes (was: Is it UploadedFile.chunks() or .chunk() ?)

On Thu, Jul 3, 2008 at 12:03 PM, Marty Alchin <gulop...@gamemusic.org> wrote:
> 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?

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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google