Re: Store uploaded image by id

2006-11-08 Thread Dirk Eschler
Am Mittwoch, 8. November 2006 02:06 schrieb Enrico: > Hi Dirk, > > I'm the author of that Wiki page, I've put that code on > '/util/'. > > You could put somewhere else in your python path if you plan to use it > in more projects. > But Django doesn't look for custom fields anywhere, you'll have

Re: Store uploaded image by id

2006-11-07 Thread Enrico
Hi Dirk, I'm the author of that Wiki page, I've put that code on '/util/'. You could put somewhere else in your python path if you plan to use it in more projects. But Django doesn't look for custom fields anywhere, you'll have to import in your code. Best regards. Enrico

Re: Store uploaded image by id

2006-10-26 Thread Dirk Eschler
Am Mittwoch, 25. Oktober 2006 03:20 schrieb Malcolm Tredinnick: > On Tue, 2006-10-24 at 19:10 +0200, Dirk Eschler wrote: > > Hi, > > > > i'm trying to store an uploaded image in a directory named after its id. > > Like in this simplified example: > > > > class Project(models.Model): > > image

Re: Store uploaded image by id

2006-10-24 Thread Malcolm Tredinnick
On Tue, 2006-10-24 at 19:10 +0200, Dirk Eschler wrote: > Hi, > > i'm trying to store an uploaded image in a directory named after its id. Like > in this simplified example: > > class Project(models.Model): > image = models.ImageField(upload_to='upload/projects/'+self.id) > > Since self

Re: Store uploaded image by id

2006-10-24 Thread sansmojo
I haven't tried this myself yet, but you might check out AutoImageField at http://code.djangoproject.com/wiki/CustomUploadAndFilters --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Store uploaded image by id

2006-10-24 Thread Dirk Eschler
Hi, i'm trying to store an uploaded image in a directory named after its id. Like in this simplified example: class Project(models.Model): image = models.ImageField(upload_to='upload/projects/'+self.id) Since self isn't defined, how can i access the id? Best Regards, Dirk Eschler --