From 9fdd7c97860befc4f843782cfa083ab90a33ce7a Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sun, 18 Mar 2018 11:37:27 +0100 Subject: [PATCH] =?UTF-8?q?Modification=20de=20l'affichage=20des=20cat?= =?UTF-8?q?=C3=A9gories.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/migrations/0008_auto_20180315_1337.py | 18 ++++++++++++++++++ content/models.py | 3 ++- content/templates/content/content_list.html | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 content/migrations/0008_auto_20180315_1337.py diff --git a/content/migrations/0008_auto_20180315_1337.py b/content/migrations/0008_auto_20180315_1337.py new file mode 100644 index 0000000..fd75f5e --- /dev/null +++ b/content/migrations/0008_auto_20180315_1337.py @@ -0,0 +1,18 @@ +# Generated by Django 2.0.1 on 2018-03-15 12:37 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('content', '0007_auto_20180309_1315'), + ] + + operations = [ + migrations.AlterField( + model_name='category', + name='description', + field=models.TextField(blank=True, default='', verbose_name='Description de la catégorie'), + ), + ] diff --git a/content/models.py b/content/models.py index aa8c90b..954f8cc 100644 --- a/content/models.py +++ b/content/models.py @@ -19,7 +19,8 @@ class Category(models.Model): ) description = models.TextField( verbose_name="Description de la catégorie", - default="" + default="", + blank=True ) image = models.ImageField( verbose_name="Illustration de la catégorie", diff --git a/content/templates/content/content_list.html b/content/templates/content/content_list.html index 7b0b11d..c40c7c1 100644 --- a/content/templates/content/content_list.html +++ b/content/templates/content/content_list.html @@ -22,7 +22,7 @@ $('html, body').animate({scrollTop: $('#category-content').offset().top}, 800);

{{category.name}}

-

{{category.description_short}}

+

{{category.description_short|safe}}