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_filename() is still present, it just issues a DeprecationWarning > > I'd say the right approach would be: > > * Change the docs to indicate that FileBackend.open(mode) is the right > way to read/write files. > > * Make Model.get_FIELD_filename() simply call FileBackend.get_filename(). Well, FileSystemBackend._get_absolute_path(), to be accurate. :) > * Make backends for which filenames don't make sense raise an > exception when used with get_FIELD_filename() They'll raise an AttributeError, since _get_absolute_path() isn't implemented. I can have it raise something more specific if necessary though. > Oh, and I don't know if this is on the list, but whatever you do > *please* don't break Model.get_FIELD_url(); I can't even count the > number of places that would bite me. Well, none of the get_FIELD_* functions are gone in this patch. They all redirect to the new implementation, issuing a DeprecationWarning along the way. 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 right before I check it in. -Gul --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---