Re: Using primary key ID in file upload location?

2008-03-10 Thread Nick Day
Hi, Thanks for your replies - very helpful. I didn't realise that Django appended underscores - I think that's the easiest solution for me to use for the time being, at least until I get more comfortable with using Django. My "organisational reasons" weren't particularly important other than

Re: Using primary key ID in file upload location?

2008-03-10 Thread Marty Alchin
On Sun, Mar 9, 2008 at 5:51 PM, Nick Day <[EMAIL PROTECTED]> wrote: > I have a model with several fields, some of which are ImageFields. To > help prevent files overwriting others (if they are uploaded with the > same name), and for organisational reasons, I would like to upload the > images

Re: Using primary key ID in file upload location?

2008-03-10 Thread Thomas Guettler
Nick Day schrieb: > Hi, > > I'm quite new to Django so apologies if this is a really easy > question! > > I have a model with several fields, some of which are ImageFields. To > help prevent files overwriting others (if they are uploaded with the > same name), and for organisational reasons, I

Re: Using primary key ID in file upload location?

2008-03-10 Thread Pete Crosier
Currently, Django won't overwrite uploaded files, it'll append a "_" to the filename until it's unique. Django does let you organise files by strftime formatting - http://www.djangoproject.com/documentation/model-api/#filefield - it might be worth checking djangosnippets.org or searching in the

Using primary key ID in file upload location?

2008-03-09 Thread Nick Day
Hi, I'm quite new to Django so apologies if this is a really easy question! I have a model with several fields, some of which are ImageFields. To help prevent files overwriting others (if they are uploaded with the same name), and for organisational reasons, I would like to upload the images to