On Nov 20, 2007 3:33 PM, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
> It would be nice to be able to include this in the upload_to parameter.
> Something like
> 'upload/%(model_name)s/%(instance_id)s.%(mimetype_extension)s' perhaps?
> Maybe, if the parameter ends with a slash, the handler could know "ok.
> this is a directory. let's keep the original filename".

As usual, I'll respond to this as I've been doing a good bit of work
in this area lately. There's no "official" way to do this yet, but
there are ways to get the job done. Take a look at the links below for
more information on some techniques.

I'm doing a good bit of work on making Django handle renaming a bit
better, and I'm hoping it will land during the next sprint on December
1. There's no guarantee of that, of course, but that's my personal
goal. That will be documented thoroughly when it lands, and I'll make
an announcement here on django-users whenever that is, sprint or not.

-Gul

http://scottbarnham.com/blog/2007/07/31/uploading-images-to-a-dynamic-path-with-django/
http://code.djangoproject.com/wiki/CustomUploadAndFilters
http://gulopine.gamemusic.org/2007/11/customizing-filenames-without-patching.html

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to