From 2215fbc9d71a483ea9fd297dfe49aba1363f1b43 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Tue, 30 Jan 2018 22:56:30 +0100 Subject: [PATCH] =?UTF-8?q?Meilleur=20affichage=20des=20cat=C3=A9gories.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/models.py b/content/models.py index 0ef0972..24cd994 100644 --- a/content/models.py +++ b/content/models.py @@ -12,6 +12,9 @@ class Category(models.Model): def get_absolute_url(self): return reverse('content:category-list', kwargs={'category_id':self.id}) + def __str__(self): + return self.name + class Content(models.Model): """Un contenu du site (vidéo).""" @@ -33,3 +36,6 @@ class Content(models.Model): verbose_name="Catégorie", null=True ) + + def __str__(self): + return self.name