From 9e0a80a419c10a2492624de8c7cdb4e2576f45b2 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Wed, 6 Dec 2017 18:28:35 +0100 Subject: [PATCH] change the article description to TextField type A text field makes it easier to edit the description than with a CharField because the text box is bigger. --- django/didgeridoo/webshop/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/didgeridoo/webshop/models.py b/django/didgeridoo/webshop/models.py index 0a07ac0..2c32240 100644 --- a/django/didgeridoo/webshop/models.py +++ b/django/didgeridoo/webshop/models.py @@ -46,8 +46,8 @@ 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) + description = models.TextField(max_length=2000) stock = models.FloatField(max_length=5) status = models.ForeignKey(ArticleStatus) price_in_chf = models.DecimalField(max_digits=19, decimal_places=2)