I'm trying to store images using the admin interface with the id as the filename.
class ProductImage(models.Model): image = ImageField(upload_to=get_path) def get_path(self, filename): return 'product_images/%s.jpg' % self.id However, the images get stored as 'product_images/None.jpg'... Any ideas on how to approach this? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---