November 7, 2007

1 article; also check out the month of November or even the whole year.

Customizing filenames without patching Django

Recently, I’ve noticed a good bit of chatter on the mailing lists about how to override the filename of an uploaded file before saving it. Django currently provides options for customizing the location based on upload time, but nothing else. Often, projects find the need to store attachments in directories according to details of the object or a related object. I’m doing a good bit of work on FileField at the moment, but that’s still a way off and doesn’t yet address this issue anyway.