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

-- 
Dirk Eschler <mailto:[EMAIL PROTECTED]>
http://www.krusader.org

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to