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}}