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
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
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
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
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
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
--
6 matches
Mail list logo