Re: get_FIELD_filename() in pluggable FileField backends

2007-09-08 Thread Marty Alchin
I submitted a new patch, which moves the backend code into django.core.filestorage and tweaks a few minor things. Most importantly, this new patch includes documentation in the form of a new document, files.txt, and some minor updates to model-api.txt and db-api.txt. The documentation probably is

Re: get_FIELD_filename() in pluggable FileField backends

2007-09-08 Thread Marty Alchin
On 9/8/07, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > I'd say something like django.core.filesystems would be a good idea > (though I'd call it django.core.filestorage and paint the bikeshed > yellow.) I have pretty much zero preference on what it's called or where it goes, so yellow sounds f

Re: get_FIELD_filename() in pluggable FileField backends

2007-09-08 Thread Jacob Kaplan-Moss
On 9/8/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > Doing some more thinking on the subject, it might make sense to move > the backends outside the django.db.models area, since they're really > not specific to that. Maybe something like django.core.filesystems? > Since, in theory, they could poss

Re: get_FIELD_filename() in pluggable FileField backends

2007-09-08 Thread Marty Alchin
On 9/7/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > I hope the source makes enough sense to give you guys a decent idea of > how I'm approaching this. I'm not happy with the organization of it, > but I'm not sure how best to organize everything. It seems like it'd > be better to break the file st

Re: get_FIELD_filename() in pluggable FileField backends

2007-09-07 Thread Marty Alchin
On 9/7/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > The patch isn't quite ready yet after all. Once I got the code home > and started to plug it into a proper trunk checkout, it's taking a bit > more effort than I expected to get it to work properly. I'd rather > make sure it does in fact work ri

Re: get_FIELD_filename() in pluggable FileField backends

2007-09-07 Thread Marty Alchin
On 9/7/07, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > I think, though, for the sake of backwards-compat we shouldn't remove > get_FIELD_filename() -- storing files on the filesystem is going to be > by far the common case; let's not make those doing the common thing > suffer. Well, get_FIELD_

Re: get_FIELD_filename() in pluggable FileField backends

2007-09-07 Thread Jacob Kaplan-Moss
On 9/7/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > I could do that, yes, I just worry that people might use it without > the proper checks, then have problems when things break. Especially > when (I expect) the most common use of get_FIELD_filename(), opening a > file for reading/writing, has a

Re: get_FIELD_filename() in pluggable FileField backends

2007-09-07 Thread Marty Alchin
I could do that, yes, I just worry that people might use it without the proper checks, then have problems when things break. Especially when (I expect) the most common use of get_FIELD_filename(), opening a file for reading/writing, has a much better, and backend-agnostic method available. I'd muc

Re: get_FIELD_filename() in pluggable FileField backends

2007-09-07 Thread Joseph Kocherhans
On 9/7/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > > I'll be posting the patch in a couple hours, once I get to a PC with a > proper diff tool. And I'm not so much concerned with whether or not I > should be setting up a new object, as much as the fact the exact > functionality provided by get_F

Re: get_FIELD_filename() in pluggable FileField backends

2007-09-07 Thread Marty Alchin
On 9/7/07, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > Could you post your current patch to Trac? I'd find it a lot easier to > comment if I could look at some code. Using an object to represent the > file rather than a bunch of special model methods definitely seems > like the right direction

Re: get_FIELD_filename() in pluggable FileField backends

2007-09-07 Thread Joseph Kocherhans
On 9/7/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > > I don't want to be annoying, but I thought I'd ping this question, > because I'd like to get some feedback in time to have pluggable > FileField backends ready for consideration before (or during) the > sprint next week. Could you post your c

Re: get_FIELD_filename() in pluggable FileField backends

2007-09-07 Thread Marty Alchin
I don't want to be annoying, but I thought I'd ping this question, because I'd like to get some feedback in time to have pluggable FileField backends ready for consideration before (or during) the sprint next week. -Gul On 9/4/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > On 9/4/07, Marty Alchin

Re: get_FIELD_filename() in pluggable FileField backends

2007-09-04 Thread Marty Alchin
On 9/4/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > Some methods that are implemented include get_filename(), > get_absolute_url() and get_filesize(). Before this sparks any confusion, allow me to correct myself. get_filename() is not an available method on the special File object. I had it impl

get_FIELD_filename() in pluggable FileField backends

2007-09-04 Thread Marty Alchin
I finally have some code to support multiple backends, but I'd like to ask a question and write some documentation before I create a ticket for it. I apologize in advance for such a long email, but there's a bit of backstory necessary to ask the question. I was wondering about the intended use of