remove the delete option from the picture model
This option got added by accident. If we would keep it then the related article would get deleted when one deletes a picture.
This commit is contained in:
parent
2f58fcec94
commit
e54765a54f
|
@ -68,8 +68,8 @@ class OrderOfGoods(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class Picture(models.Model):
|
class Picture(models.Model):
|
||||||
article = models.ForeignKey(Article, on_delete=models.CASCADE)
|
|
||||||
name = models.CharField(max_length=200)
|
name = models.CharField(max_length=200)
|
||||||
|
article = models.ForeignKey(Article)
|
||||||
image = models.ImageField(upload_to="images")
|
image = models.ImageField(upload_to="images")
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user