From e6f9173c6231e7f4fd2ab8f99cab455e20df3ae7 Mon Sep 17 00:00:00 2001 From: Maurice Debray Date: Thu, 23 Dec 2021 22:56:51 +0100 Subject: [PATCH] =?UTF-8?q?Modification=20du=20mod=C3=A8le=20et=20des=20vu?= =?UTF-8?q?es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- actu/models.py | 1 + actu/views.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/actu/models.py b/actu/models.py index e5df7b1..2fd4625 100644 --- a/actu/models.py +++ b/actu/models.py @@ -7,6 +7,7 @@ class Actu(models.Model): text = models.TextField(_("Info"), null=True, blank=False) text_en = models.TextField(("Info en anglais"), null=True, blank=True) order = models.IntegerField(verbose_name=_("ordre")) + rainbow = models.BooleanField(_("Actu en arc-en-ciel"), default=False) def __str__(self): return self.text diff --git a/actu/views.py b/actu/views.py index 5aa23af..ed8049e 100644 --- a/actu/views.py +++ b/actu/views.py @@ -14,7 +14,7 @@ class ActuList(ChefRequiredMixin, ListView): class ActuCreate(ChefRequiredMixin, CreateView): model = Actu - fields = ["text", "order", "text_en"] + fields = ["text", "order", "text_en", "rainbow"] template_name = "actu/create_actu.html" success_url = reverse_lazy("actu:liste") @@ -26,7 +26,7 @@ class ActuCreate(ChefRequiredMixin, CreateView): class ActuUpdate(ChefRequiredMixin, UpdateView): model = Actu - fields = ["text", "order", "text_en"] + fields = ["text", "order", "text_en", "rainbow"] template_name = "actu/update_actu.html" success_url = reverse_lazy("actu:liste")