Jay Parlar wrote:

>+        def save_func(instance, filename, raw_contents, upload_to=""):
>+            if upload_to:
>+                self.upload_to = upload_to
>+            instance._save_FIELD_file(self, filename, raw_contents)
>+        setattr(cls, 'save_%s_file' % self.name, save_func)
>  
>
I would prefer self.upload_to to be restored to its original value after 
call. Otherwise a call to save_*_file with a custom parameter would 
change object's "global" behavior which is very counter-intuitive. In 
fact I think custom upload_to should be passed further down to 
_save_FIELD_file and replaced there locally.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to