add category foreign keys to the article

This commit is contained in:
Andreas Zweili 2017-12-06 18:27:58 +01:00
parent 134c5ea066
commit 843ff35eaf
1 changed files with 1 additions and 0 deletions

View File

@ -47,6 +47,7 @@ class Category(models.Model):
class Article(models.Model):
name = models.CharField(max_length=200)
description = models.CharField(max_length=2000)
category = models.ForeignKey(Category, null=True)
stock = models.FloatField(max_length=5)
status = models.ForeignKey(ArticleStatus)
price_in_chf = models.DecimalField(max_digits=19, decimal_places=2)