add images to the Picture model
In addition to the image attribute I added the directory where the images get stored.
This commit is contained in:
parent
bba1bde937
commit
71438ed14c
|
@ -77,6 +77,7 @@ class OrderOfGoods(models.Model):
|
|||
class Picture(models.Model):
|
||||
name = models.CharField(max_length=200, unique=True)
|
||||
article = models.ForeignKey(Article, on_delete=models.CASCADE)
|
||||
image = models.ImageField(upload_to="images")
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
|
Loading…
Reference in New Issue