supermarket category api working

This commit is contained in:
vabene1111
2021-01-26 16:16:45 +01:00
parent 09716f2b00
commit 5ab19b7958
3 changed files with 42 additions and 16 deletions

View File

@@ -162,8 +162,8 @@ class Supermarket(models.Model):
class SupermarketCategoryRelation(models.Model):
supermarket = models.ForeignKey(Supermarket, on_delete=models.CASCADE)
category = models.ForeignKey(SupermarketCategory, on_delete=models.CASCADE)
supermarket = models.ForeignKey(Supermarket, on_delete=models.CASCADE, related_name='category_to_supermarket')
category = models.ForeignKey(SupermarketCategory, on_delete=models.CASCADE, related_name='category_to_supermarket')
order = models.IntegerField(default=0)