From 8ff9e7f23ea479605a05d6b97831bb6e19163dd2 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 11 Oct 2016 11:47:12 +0200 Subject: [PATCH] Simplify models --- app/organization/core/models.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/organization/core/models.py b/app/organization/core/models.py index eab41f7b..c02bc6d8 100644 --- a/app/organization/core/models.py +++ b/app/organization/core/models.py @@ -24,11 +24,10 @@ class Description(models.Model): abstract = True -class Named(models.Model): +class Named(Description): """Abstract model providing a name field""" name = models.CharField(_('name'), max_length=512) - description = models.TextField(_('description'), blank=True) class Meta: abstract = True @@ -42,11 +41,10 @@ class Named(models.Model): return slugify(self.__unicode__()) -class Titled(models.Model): +class Titled(Description): """Abstract model providing a title field""" title = models.CharField(_('title'), max_length=1024) - description = models.TextField(_('description'), blank=True) class Meta: abstract = True -- 2.39.5