-
INFO: Caaaataaaapuuuulte!!!!
""",
- r.content.decode(),
- )
+ self.assertInHTML(f'
{markdown(alert_msg)}
', r.text)
+ self.assertInHTML(f'
{markdown(info_msg)}
', r.text)
def test_birthday_non_subscribed_user(self):
- self.client.force_login(User.objects.get(username="guy"))
+ self.client.force_login(baker.make(User))
response = self.client.get(reverse("core:index"))
self.assertContains(
response,
@@ -111,6 +76,7 @@ class TestCom(TestCase):
)
def test_birthday_subscibed_user(self):
+ self.client.force_login(subscriber_user.make())
response = self.client.get(reverse("core:index"))
self.assertNotContains(
@@ -119,7 +85,7 @@ class TestCom(TestCase):
)
def test_birthday_old_subscibed_user(self):
- self.client.force_login(User.objects.get(username="old_subscriber"))
+ self.client.force_login(old_subscriber_user.make())
response = self.client.get(reverse("core:index"))
self.assertNotContains(
diff --git a/com/urls.py b/com/urls.py
index d94b0f50..6984ae13 100644
--- a/com/urls.py
+++ b/com/urls.py
@@ -16,8 +16,7 @@
from django.urls import path
from com.views import (
- AlertMsgEditView,
- InfoMsgEditView,
+ BannerMessagesEditView,
NewsAdminListView,
NewsCreateView,
NewsDeleteView,
@@ -45,8 +44,7 @@ from com.views import (
)
urlpatterns = [
- path("sith/edit/alert/", AlertMsgEditView.as_view(), name="alert_edit"),
- path("sith/edit/info/", InfoMsgEditView.as_view(), name="info_edit"),
+ path("sith/edit/banner/", BannerMessagesEditView.as_view(), name="banner_edit"),
path(
"sith/edit/weekmail_destinations/",
WeekmailDestinationEditView.as_view(),
diff --git a/com/views.py b/com/views.py
index 9f845370..28c1de43 100644
--- a/com/views.py
+++ b/com/views.py
@@ -75,14 +75,9 @@ class ComTabsMixin(TabedViewMixin):
"name": _("Weekmail destinations"),
},
{
- "url": reverse("com:info_edit"),
- "slug": "info",
- "name": _("Info message"),
- },
- {
- "url": reverse("com:alert_edit"),
- "slug": "alert",
- "name": _("Alert message"),
+ "url": reverse("com:banner_edit"),
+ "slug": "banner",
+ "name": _("Banner messages"),
},
{
"url": reverse("com:poster_list"),
@@ -105,20 +100,14 @@ class ComEditView(ComTabsMixin, CanEditPropMixin, UpdateView):
return Sith.objects.first()
-class AlertMsgEditView(ComEditView):
+class BannerMessagesEditView(ComEditView):
form_class = modelform_factory(
- Sith, fields=["alert_msg"], widgets={"alert_msg": MarkdownInput}
+ Sith,
+ fields=["alert_msg", "info_msg"],
+ widgets={"alert_msg": MarkdownInput, "info_msg": MarkdownInput},
)
- current_tab = "alert"
- success_url = reverse_lazy("com:alert_edit")
-
-
-class InfoMsgEditView(ComEditView):
- form_class = modelform_factory(
- Sith, fields=["info_msg"], widgets={"info_msg": MarkdownInput}
- )
- current_tab = "info"
- success_url = reverse_lazy("com:info_edit")
+ current_tab = "banner"
+ success_url = reverse_lazy("com:banner_edit")
class WeekmailDestinationEditView(ComEditView):
diff --git a/core/templates/core/user_tools.jinja b/core/templates/core/user_tools.jinja
index 9206eca3..cbc98731 100644
--- a/core/templates/core/user_tools.jinja
+++ b/core/templates/core/user_tools.jinja
@@ -130,9 +130,7 @@
{% trans %}Weekmail destinations{% endtrans %}
{% trans %}Create news{% endtrans %}
{% trans %}Moderate news{% endtrans %}
-
{% trans %}Edit alert message{% endtrans %}
-
{% trans %}Edit information message{% endtrans %}
-
{% trans %}Moderate files{% endtrans %}
+
{% trans %}Edit banner messages{% endtrans %}
{% trans %}Posters{% endtrans %}
{% trans %}Screens{% endtrans %}
{% endif %}
diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po
index 53514a87..913708cf 100644
--- a/locale/fr/LC_MESSAGES/django.po
+++ b/locale/fr/LC_MESSAGES/django.po
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2026-10-27 23:26+0100\n"
+"POT-Creation-Date: 2026-11-06 17:22+0100\n"
"PO-Revision-Date: 2016-07-18\n"
"Last-Translator: Maréchal
\n"
@@ -20,15 +20,15 @@ msgstr ""
msgid "Email domain is not allowed."
msgstr "Le domaine de l'addresse e-mail n'est pas autorisé."
-#: antispam/models.py
+#: antispam/models/models.py
msgid "domain"
msgstr "domaine"
-#: antispam/models.py
+#: antispam/models/models.py
msgid "is externally managed"
msgstr "est géré de manière externe"
-#: antispam/models.py
+#: antispam/models/models.py
msgid ""
"True if kept up-to-date using external toxic domain providers, else False"
msgstr ""
@@ -1503,17 +1503,13 @@ msgstr "Le mot de la fin"
msgid "Communication administration"
msgstr "Administration de la communication"
-#: com/views.py core/templates/core/user_tools.jinja
+#: com/views.py
msgid "Weekmail destinations"
msgstr "Destinataires du Weekmail"
#: com/views.py
-msgid "Info message"
-msgstr "Message d'info"
-
-#: com/views.py
-msgid "Alert message"
-msgstr "Message d'alerte"
+msgid "Banner messages"
+msgstr "Messages de bannière"
#: com/views.py
msgid "Posters list"
@@ -2984,24 +2980,6 @@ msgstr "Gestion générale des comptoirs"
msgid "Products management"
msgstr "Gestion des produits"
-#: core/templates/core/user_tools.jinja
-msgid "Product types management"
-msgstr "Gestion des types de produit"
-
-#: core/templates/core/user_tools.jinja
-msgid "Returnable products management"
-msgstr "Gestion des consignes"
-
-#: core/templates/core/user_tools.jinja
-#: counter/templates/counter/cash_summary_list.jinja counter/views/mixins.py
-msgid "Cash register summaries"
-msgstr "Relevés de caisse"
-
-#: core/templates/core/user_tools.jinja
-#: counter/templates/counter/invoices_call.jinja counter/views/mixins.py
-msgid "Invoices call"
-msgstr "Appels à facture"
-
#: core/templates/core/user_tools.jinja core/views/user.py
#: counter/templates/counter/counter_list.jinja
msgid "Stats"
@@ -3011,6 +2989,11 @@ msgstr "Stats"
msgid "Accounting"
msgstr "Comptabilité"
+#: core/templates/core/user_tools.jinja
+#: counter/templates/counter/invoices_call.jinja counter/views/mixins.py
+msgid "Invoices call"
+msgstr "Appels à facture"
+
#: core/templates/core/user_tools.jinja
msgid "Refound Account"
msgstr "Rembourser un compte"
@@ -3019,25 +3002,13 @@ msgstr "Rembourser un compte"
msgid "Communication"
msgstr "Communication"
-#: core/templates/core/user_tools.jinja
-msgid "Create weekmail article"
-msgstr "Rédiger un nouvel article dans le Weekmail"
-
#: core/templates/core/user_tools.jinja
msgid "Moderate news"
msgstr "Modérer les nouvelles"
#: core/templates/core/user_tools.jinja
-msgid "Edit alert message"
-msgstr "Éditer le message d'alerte"
-
-#: core/templates/core/user_tools.jinja
-msgid "Edit information message"
-msgstr "Éditer le message d'informations"
-
-#: core/templates/core/user_tools.jinja
-msgid "Moderate files"
-msgstr "Modérer les fichiers"
+msgid "Edit banner messages"
+msgstr "Éditer les messages de bannière"
#: core/templates/core/user_tools.jinja
msgid "Moderate pictures"
@@ -3787,6 +3758,10 @@ msgstr "Liste des relevés de caisse"
msgid "Theoric sums"
msgstr "Sommes théoriques"
+#: counter/templates/counter/cash_summary_list.jinja counter/views/mixins.py
+msgid "Cash register summaries"
+msgstr "Relevés de caisse"
+
#: counter/templates/counter/cash_summary_list.jinja counter/views/cash.py
msgid "Emptied"
msgstr "Coffre vidé"