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")