Added product pictures

This commit is contained in:
Raphael Michel
2015-07-25 23:58:02 +02:00
parent 8732e92cde
commit 0cbf9aeec3
8 changed files with 49 additions and 1 deletions

View File

@@ -875,6 +875,14 @@ class Item(Versionable):
position = models.IntegerField(
default=0
)
picture = models.ImageField(
verbose_name=_("Product picture"),
null=True, blank=True,
upload_to=lambda instance, filename: '%s/%s/item-%s.%s' % (
instance.event.organizer.slug, instance.event.slug, instance.identity,
filename.split('.')[-1]
)
)
class Meta:
verbose_name = _("Product")