diff --git a/src/agenda_culturel/forms.py b/src/agenda_culturel/forms.py index 95a9329..9d48b15 100644 --- a/src/agenda_culturel/forms.py +++ b/src/agenda_culturel/forms.py @@ -264,7 +264,10 @@ class CategorisationRuleImportForm(ModelForm): class MultipleChoiceFieldAcceptAll(MultipleChoiceField): def validate(self, value): - pass + # check if each element is without "/" + for item in value: + if "/" in item: + raise ValidationError(_("The '/' character is not allowed.")) class EventForm(GroupFormMixin, ModelForm): diff --git a/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po b/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po index 881428b..271b675 100644 --- a/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po +++ b/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: agenda_culturel\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-02 21:35+0200\n" +"POT-Creation-Date: 2025-04-03 19:36+0200\n" "PO-Revision-Date: 2023-10-29 14:16+0000\n" "Last-Translator: Jean-Marie Favreau \n" "Language-Team: Jean-Marie Favreau \n" @@ -142,12 +142,12 @@ msgstr "dernier créé d'abord" msgid "Imported from" msgstr "Importé depuis" -#: agenda_culturel/filters.py:470 agenda_culturel/models.py:867 -#: agenda_culturel/models.py:2982 +#: agenda_culturel/filters.py:470 agenda_culturel/models.py:873 +#: agenda_culturel/models.py:2988 msgid "Status" msgstr "Status" -#: agenda_culturel/filters.py:471 agenda_culturel/models.py:2747 +#: agenda_culturel/filters.py:471 agenda_culturel/models.py:2753 msgid "Closed" msgstr "Fermé" @@ -156,7 +156,7 @@ msgid "Open" msgstr "Ouvert" #: agenda_culturel/filters.py:475 agenda_culturel/filters.py:476 -#: agenda_culturel/models.py:2741 +#: agenda_culturel/models.py:2747 msgid "Spam" msgstr "Spam" @@ -164,7 +164,7 @@ msgstr "Spam" msgid "Non spam" msgstr "Non spam" -#: agenda_culturel/filters.py:481 agenda_culturel/models.py:2762 +#: agenda_culturel/filters.py:481 agenda_culturel/models.py:2768 msgid "Type" msgstr "Type" @@ -195,11 +195,11 @@ msgstr "" msgid "Your email" msgstr "Votre adresse email" -#: agenda_culturel/forms.py:166 agenda_culturel/models.py:2729 +#: agenda_culturel/forms.py:166 agenda_culturel/models.py:2735 msgid "Your email address" msgstr "Votre adresse email" -#: agenda_culturel/forms.py:172 agenda_culturel/models.py:2754 +#: agenda_culturel/forms.py:172 agenda_culturel/models.py:2760 msgid "Comments" msgstr "Commentaires" @@ -214,20 +214,20 @@ msgstr "" msgid "Receive notification of publication or leave a message for moderation" msgstr "Être notifié de la publication ou laisser un message à la modération" -#: agenda_culturel/forms.py:206 agenda_culturel/models.py:308 -#: agenda_culturel/models.py:875 agenda_culturel/models.py:2906 -#: agenda_culturel/models.py:3017 +#: agenda_culturel/forms.py:206 agenda_culturel/models.py:313 +#: agenda_culturel/models.py:881 agenda_culturel/models.py:2912 +#: agenda_culturel/models.py:3023 msgid "Category" msgstr "Catégorie" #: agenda_culturel/forms.py:212 agenda_culturel/forms.py:245 #: agenda_culturel/forms.py:288 agenda_culturel/forms.py:472 -#: agenda_culturel/models.py:361 agenda_culturel/models.py:992 +#: agenda_culturel/models.py:367 agenda_culturel/models.py:998 msgid "Tags" msgstr "Étiquettes" #: agenda_culturel/forms.py:220 agenda_culturel/forms.py:637 -#: agenda_culturel/models.py:1122 +#: agenda_culturel/models.py:1128 msgid "Event" msgstr "Événement" @@ -266,13 +266,13 @@ msgstr "Cet événement est récurrent" msgid "Details" msgstr "Détails" -#: agenda_culturel/forms.py:378 agenda_culturel/models.py:904 -#: agenda_culturel/models.py:2881 +#: agenda_culturel/forms.py:378 agenda_culturel/models.py:910 +#: agenda_culturel/models.py:2887 msgid "Location" msgstr "Localisation" -#: agenda_culturel/forms.py:383 agenda_culturel/models.py:106 -#: agenda_culturel/models.py:948 +#: agenda_culturel/forms.py:383 agenda_culturel/models.py:111 +#: agenda_culturel/models.py:954 msgid "Illustration" msgstr "Illustration" @@ -346,8 +346,8 @@ msgstr "Valeur de la version sélectionnée" msgid "Apply category {} to the event {}" msgstr "Appliquer la catégorie {} à l'événement {}" -#: agenda_culturel/forms.py:863 agenda_culturel/models.py:692 -#: agenda_culturel/models.py:3069 +#: agenda_culturel/forms.py:863 agenda_culturel/models.py:698 +#: agenda_culturel/models.py:3075 msgid "Place" msgstr "Lieu" @@ -369,7 +369,7 @@ msgstr "" msgid "Header" msgstr "Entête" -#: agenda_culturel/forms.py:920 agenda_culturel/models.py:654 +#: agenda_culturel/forms.py:920 agenda_culturel/models.py:660 msgid "Address" msgstr "Adresse" @@ -414,67 +414,71 @@ msgstr "" "la page n'était pas encore peuplée des événements, le temps de chargement a " "sans doute été trop court" -#: agenda_culturel/models.py:64 +#: agenda_culturel/models.py:65 msgid "mean" msgstr "moyenne" -#: agenda_culturel/models.py:64 +#: agenda_culturel/models.py:65 msgid "median" msgstr "médiane" -#: agenda_culturel/models.py:64 +#: agenda_culturel/models.py:65 msgid "maximum" msgstr "maximum" -#: agenda_culturel/models.py:64 +#: agenda_culturel/models.py:65 msgid "minimum" msgstr "minimum" -#: agenda_culturel/models.py:64 +#: agenda_culturel/models.py:65 msgid "stdev" msgstr "écart-type" #: agenda_culturel/models.py:69 +msgid "The '/' character is not allowed." +msgstr "Le caractère '/' n'est pas autorisé." + +#: agenda_culturel/models.py:74 msgid "Site name" msgstr "Nom du site" -#: agenda_culturel/models.py:72 +#: agenda_culturel/models.py:77 msgid "Site url" msgstr "URL du site" -#: agenda_culturel/models.py:75 +#: agenda_culturel/models.py:80 msgid "Site description" msgstr "Description du site" -#: agenda_culturel/models.py:81 +#: agenda_culturel/models.py:86 msgid "Keywords in html header" msgstr "Mots-clés dans l'entête html" -#: agenda_culturel/models.py:86 +#: agenda_culturel/models.py:91 msgid "Description in html header" msgstr "Description dans l'entête html" -#: agenda_culturel/models.py:91 +#: agenda_culturel/models.py:96 msgid "Google site verification value" msgstr "Valeur de vérification de site Google" -#: agenda_culturel/models.py:98 +#: agenda_culturel/models.py:103 msgid "Microsoft (bing) site verification value" msgstr "Valeur de vérification de site Microsoft (bing)" -#: agenda_culturel/models.py:112 +#: agenda_culturel/models.py:117 msgid "Illustration (development version)" msgstr "Illustration (version de développement)" -#: agenda_culturel/models.py:145 agenda_culturel/models.py:148 +#: agenda_culturel/models.py:150 agenda_culturel/models.py:153 msgid "Site Configuration" msgstr "Configuration du site" -#: agenda_culturel/models.py:159 +#: agenda_culturel/models.py:164 msgid "Expert moderation user" msgstr "Utilisateur expert en modération" -#: agenda_culturel/models.py:161 +#: agenda_culturel/models.py:166 msgid "" "This user is an expert in moderation, and the interface features additional " "functionalities." @@ -482,102 +486,102 @@ msgstr "" "Cet utilisateur est un expert en modération, et l'interface comporte des " "fonctionnalités additionnelles." -#: agenda_culturel/models.py:167 agenda_culturel/models.py:171 +#: agenda_culturel/models.py:172 agenda_culturel/models.py:176 msgid "User profile" msgstr "" -#: agenda_culturel/models.py:168 +#: agenda_culturel/models.py:173 msgid "User profiles" msgstr "" -#: agenda_culturel/models.py:191 agenda_culturel/models.py:238 -#: agenda_culturel/models.py:317 agenda_culturel/models.py:611 -#: agenda_culturel/models.py:652 agenda_culturel/models.py:758 -#: agenda_culturel/models.py:2721 agenda_culturel/models.py:2831 +#: agenda_culturel/models.py:196 agenda_culturel/models.py:243 +#: agenda_culturel/models.py:322 agenda_culturel/models.py:617 +#: agenda_culturel/models.py:658 agenda_culturel/models.py:764 +#: agenda_culturel/models.py:2727 agenda_culturel/models.py:2837 msgid "Name" msgstr "Nom" -#: agenda_culturel/models.py:192 agenda_culturel/models.py:238 +#: agenda_culturel/models.py:197 agenda_culturel/models.py:243 msgid "Category name" msgstr "Nom de la catégorie" -#: agenda_culturel/models.py:197 +#: agenda_culturel/models.py:202 msgid "Content" msgstr "Contenu" -#: agenda_culturel/models.py:198 +#: agenda_culturel/models.py:203 msgid "Text as shown to the visitors" msgstr "Texte tel que présenté aux visiteureuses" -#: agenda_culturel/models.py:202 +#: agenda_culturel/models.py:207 msgid "URL path" msgstr "Chemin URL" -#: agenda_culturel/models.py:203 +#: agenda_culturel/models.py:208 msgid "URL path where the content is included." msgstr "Chemin URL où le contenu est présent." -#: agenda_culturel/models.py:207 +#: agenda_culturel/models.py:212 msgid "Static content" msgstr "Contenu statique" -#: agenda_culturel/models.py:208 +#: agenda_culturel/models.py:213 msgid "Static contents" msgstr "Contenus statiques" -#: agenda_culturel/models.py:244 +#: agenda_culturel/models.py:249 msgid "Color" msgstr "Couleur" -#: agenda_culturel/models.py:245 +#: agenda_culturel/models.py:250 msgid "Color used as background for the category" msgstr "Couleur utilisée comme fond de la catégorie" -#: agenda_culturel/models.py:251 +#: agenda_culturel/models.py:256 msgid "Pictogram" msgstr "Pictogramme" -#: agenda_culturel/models.py:252 +#: agenda_culturel/models.py:257 msgid "Pictogram of the category (svg format)" msgstr "Pictogramme de la catégorie (format svg)" -#: agenda_culturel/models.py:259 +#: agenda_culturel/models.py:264 msgid "Position for ordering categories" msgstr "Position pour ordonner les catégories" -#: agenda_culturel/models.py:309 +#: agenda_culturel/models.py:314 msgid "Categories" msgstr "Catégories" -#: agenda_culturel/models.py:318 +#: agenda_culturel/models.py:323 msgid "Tag name" msgstr "Nom de l'étiquette" -#: agenda_culturel/models.py:324 agenda_culturel/models.py:675 -#: agenda_culturel/models.py:774 agenda_culturel/models.py:931 +#: agenda_culturel/models.py:330 agenda_culturel/models.py:681 +#: agenda_culturel/models.py:780 agenda_culturel/models.py:937 msgid "Description" msgstr "Description" -#: agenda_culturel/models.py:325 +#: agenda_culturel/models.py:331 msgid "Description of the tag" msgstr "Description de l'étiquette" -#: agenda_culturel/models.py:331 agenda_culturel/models.py:2688 -#: agenda_culturel/models.py:2735 +#: agenda_culturel/models.py:337 agenda_culturel/models.py:2694 +#: agenda_culturel/models.py:2741 msgid "Message" msgstr "Message" -#: agenda_culturel/models.py:333 +#: agenda_culturel/models.py:339 msgid "Message displayed to the user on each event associated with this tag." msgstr "" "Message affiché à l'utilisateur sur chaque événement associé à cette " "étiquette." -#: agenda_culturel/models.py:340 +#: agenda_culturel/models.py:346 msgid "Principal" msgstr "Principal" -#: agenda_culturel/models.py:342 +#: agenda_culturel/models.py:348 msgid "" "This tag is highlighted as a main tag for visitors, particularly in the " "filter." @@ -585,91 +589,91 @@ msgstr "" "Cette étiquette est mise en avant comme étiquette principale pour les " "visiteurs, en particulier dans le filtre." -#: agenda_culturel/models.py:348 +#: agenda_culturel/models.py:354 msgid "In excluded suggestions" msgstr "Dans les suggestions d'exclusion" -#: agenda_culturel/models.py:349 +#: agenda_culturel/models.py:355 msgid "This tag will be part of the excluded suggestions." msgstr "Cette étiquette fera partie des suggestions d'exclusion." -#: agenda_culturel/models.py:354 +#: agenda_culturel/models.py:360 msgid "In included suggestions" msgstr "Dans les suggestions d'inclusion." -#: agenda_culturel/models.py:355 +#: agenda_culturel/models.py:361 msgid "This tag will be part of the included suggestions." msgstr "Cette étiquette fera partie des suggestions d'inclusion." -#: agenda_culturel/models.py:360 +#: agenda_culturel/models.py:366 msgid "Tag" msgstr "Étiquette" -#: agenda_culturel/models.py:449 +#: agenda_culturel/models.py:455 msgid "Suggestions" msgstr "Suggestions" -#: agenda_culturel/models.py:450 +#: agenda_culturel/models.py:456 msgid "Others" msgstr "Autres" -#: agenda_culturel/models.py:463 +#: agenda_culturel/models.py:469 msgid "Representative event" msgstr "Événement représentatif" -#: agenda_culturel/models.py:465 +#: agenda_culturel/models.py:471 msgid "This event is the representative event of the duplicated events group" msgstr "" "Cet événement est l'événement représentatif du groupe d'événements dupliqués." -#: agenda_culturel/models.py:473 agenda_culturel/models.py:474 +#: agenda_culturel/models.py:479 agenda_culturel/models.py:480 msgid "Duplicated events" msgstr "Événements dupliqués" -#: agenda_culturel/models.py:612 +#: agenda_culturel/models.py:618 msgid "Name of the location" msgstr "Nom de la position" -#: agenda_culturel/models.py:623 +#: agenda_culturel/models.py:629 msgid "Main" msgstr "Principale" -#: agenda_culturel/models.py:625 +#: agenda_culturel/models.py:631 msgid "This location is one of the main locations (shown first higher values)." msgstr "" "Cette position est une position principale (affichage en premier des plus " "grandes valeurs)." -#: agenda_culturel/models.py:630 +#: agenda_culturel/models.py:636 msgid "Suggested distance (km)" msgstr "" -#: agenda_culturel/models.py:632 +#: agenda_culturel/models.py:638 msgid "" "If this distance is given, this location is part of the suggested filters." msgstr "" -#: agenda_culturel/models.py:641 +#: agenda_culturel/models.py:647 msgid "Reference location" msgstr "Position de référence" -#: agenda_culturel/models.py:642 +#: agenda_culturel/models.py:648 msgid "Reference locations" msgstr "Positions de référence" -#: agenda_culturel/models.py:652 +#: agenda_culturel/models.py:658 msgid "Name of the place" msgstr "Nom du lieu" -#: agenda_culturel/models.py:655 +#: agenda_culturel/models.py:661 msgid "Address of this place (without city name)" msgstr "Adresse de ce lieu (sans le nom de la ville)" -#: agenda_culturel/models.py:660 +#: agenda_culturel/models.py:666 msgid "Postcode" msgstr "Code postal" -#: agenda_culturel/models.py:662 +#: agenda_culturel/models.py:668 msgid "" "The post code is not displayed, but makes it easier to find an address when " "you enter it." @@ -677,23 +681,23 @@ msgstr "" "Le code postal ne sera pas affiché, mais facilite la recherche d'adresse au " "moment de la saisie." -#: agenda_culturel/models.py:667 +#: agenda_culturel/models.py:673 msgid "City" msgstr "Ville" -#: agenda_culturel/models.py:667 +#: agenda_culturel/models.py:673 msgid "City name" msgstr "Nom de la ville" -#: agenda_culturel/models.py:676 +#: agenda_culturel/models.py:682 msgid "Description of the place, including accessibility." msgstr "Description du lieu, inclus l'accessibilité." -#: agenda_culturel/models.py:683 +#: agenda_culturel/models.py:689 msgid "Alternative names" msgstr "Noms alternatifs" -#: agenda_culturel/models.py:685 +#: agenda_culturel/models.py:691 msgid "" "Alternative names or addresses used to match a place with the free-form " "location of an event." @@ -701,31 +705,31 @@ msgstr "" "Noms et adresses alternatives qui seront utilisées pour associer une adresse " "avec la localisation en forme libre d'un événement" -#: agenda_culturel/models.py:693 +#: agenda_culturel/models.py:699 msgid "Places" msgstr "Lieux" -#: agenda_culturel/models.py:759 +#: agenda_culturel/models.py:765 msgid "Organisation name" msgstr "Nom de l'organisme" -#: agenda_culturel/models.py:766 +#: agenda_culturel/models.py:772 msgid "Website" msgstr "Site internet" -#: agenda_culturel/models.py:767 +#: agenda_culturel/models.py:773 msgid "Website of the organisation" msgstr "Site internet de l'organisme" -#: agenda_culturel/models.py:775 +#: agenda_culturel/models.py:781 msgid "Description of the organisation." msgstr "Description de l'organisme" -#: agenda_culturel/models.py:782 +#: agenda_culturel/models.py:788 msgid "Principal place" msgstr "Lieu principal" -#: agenda_culturel/models.py:784 +#: agenda_culturel/models.py:790 msgid "" "Place mainly associated with this organizer. Mainly used if there is a " "similarity in the name, to avoid redundant displays." @@ -733,75 +737,75 @@ msgstr "" "Lieu principalement associé à cet organisateur. Principalement utilisé s'il " "y a une similarité de nom, pour éviter les affichages redondants." -#: agenda_culturel/models.py:792 +#: agenda_culturel/models.py:798 msgid "Organisation" msgstr "Organisme" -#: agenda_culturel/models.py:793 +#: agenda_culturel/models.py:799 msgid "Organisations" msgstr "Organismes" -#: agenda_culturel/models.py:804 agenda_culturel/models.py:2876 +#: agenda_culturel/models.py:810 agenda_culturel/models.py:2882 msgid "Published" msgstr "Publié" -#: agenda_culturel/models.py:805 +#: agenda_culturel/models.py:811 msgid "Draft" msgstr "Brouillon" -#: agenda_culturel/models.py:806 +#: agenda_culturel/models.py:812 msgid "Trash" msgstr "Corbeille" -#: agenda_culturel/models.py:816 +#: agenda_culturel/models.py:822 msgid "Author currently editing/moderating the event" msgstr "" -#: agenda_culturel/models.py:826 +#: agenda_culturel/models.py:832 msgid "Author of the event creation" msgstr "Auteur de la création de l'événement" -#: agenda_culturel/models.py:835 +#: agenda_culturel/models.py:841 msgid "Author of the last importation" msgstr "Auteur de la dernière importation" -#: agenda_culturel/models.py:844 +#: agenda_culturel/models.py:850 msgid "Author of the last modification" msgstr "Auteur de la dernière modification" -#: agenda_culturel/models.py:853 +#: agenda_culturel/models.py:859 msgid "Author of the last moderation" msgstr "Auteur de la dernière modération" -#: agenda_culturel/models.py:864 +#: agenda_culturel/models.py:870 msgid "Title" msgstr "Titre" -#: agenda_culturel/models.py:881 +#: agenda_culturel/models.py:887 msgid "Start day" msgstr "Date de début" -#: agenda_culturel/models.py:883 +#: agenda_culturel/models.py:889 msgid "Start time" msgstr "Heure de début" -#: agenda_culturel/models.py:889 +#: agenda_culturel/models.py:895 msgid "End day" msgstr "Date de fin" -#: agenda_culturel/models.py:893 +#: agenda_culturel/models.py:899 msgid "End time" msgstr "Heure de fin" -#: agenda_culturel/models.py:896 +#: agenda_culturel/models.py:902 msgid "Recurrence" msgstr "Récurrence" -#: agenda_culturel/models.py:910 +#: agenda_culturel/models.py:916 msgid "Location (free form)" msgstr "Localisation (forme libre)" -#: agenda_culturel/models.py:912 +#: agenda_culturel/models.py:918 msgid "" "Address of the event in case its not available in the already known places " "(free form)" @@ -809,11 +813,11 @@ msgstr "" "Adresse d'un événement si elle n'est pas déjà présente dans la liste des " "lieux disponibles (forme libre)" -#: agenda_culturel/models.py:921 +#: agenda_culturel/models.py:927 msgid "Local event" msgstr "Événement de portée locale" -#: agenda_culturel/models.py:923 +#: agenda_culturel/models.py:929 msgid "" "If the event is a local event, it will not be proposed by default in daily, " "weekly or monthly views, unless the user has explicitly indicated that he " @@ -823,11 +827,11 @@ msgstr "" "les vues quotidiennes, hebdomadaires ou mensuelles, sauf si l'utilisateur a " "explicitement indiqué qu'il souhaite voir ces événements." -#: agenda_culturel/models.py:939 +#: agenda_culturel/models.py:945 msgid "Organisers" msgstr "Organisateurs" -#: agenda_culturel/models.py:941 +#: agenda_culturel/models.py:947 msgid "" "list of event organisers. Organizers will only be displayed if one of them " "does not normally use the venue." @@ -835,112 +839,112 @@ msgstr "" "Liste des organisateurs de l'événements. Les organisateurs seront affichés " "uniquement si au moins un d'entre eux n'utilise pas habituellement le lieu." -#: agenda_culturel/models.py:955 +#: agenda_culturel/models.py:961 msgid "Illustration (URL)" msgstr "Illustration (URL)" -#: agenda_culturel/models.py:956 +#: agenda_culturel/models.py:962 msgid "External URL of the illustration image" msgstr "URL externe de l'image illustrative" -#: agenda_culturel/models.py:962 +#: agenda_culturel/models.py:968 msgid "Illustration description" msgstr "Description de l'illustration" -#: agenda_culturel/models.py:963 +#: agenda_culturel/models.py:969 msgid "Alternative text used by screen readers for the image" msgstr "Texte alternatif utiliser par les lecteurs d'écrans pour l'image" -#: agenda_culturel/models.py:971 +#: agenda_culturel/models.py:977 msgid "Importation source" msgstr "Source d'importation" -#: agenda_culturel/models.py:972 +#: agenda_culturel/models.py:978 msgid "Importation source used to detect removed entries." msgstr "Source d'importation utilisée pour détecter les éléments supprimés/" -#: agenda_culturel/models.py:978 +#: agenda_culturel/models.py:984 msgid "UUIDs" msgstr "UUIDs" -#: agenda_culturel/models.py:979 +#: agenda_culturel/models.py:985 msgid "UUIDs from import to detect duplicated entries." msgstr "UUIDs utilisés pendant l'import pour détecter les entrées dupliquées" -#: agenda_culturel/models.py:985 +#: agenda_culturel/models.py:991 msgid "Online sources or ticketing" msgstr "Sources en ligne ou billetterie" -#: agenda_culturel/models.py:999 +#: agenda_culturel/models.py:1005 msgid "Other versions" msgstr "" -#: agenda_culturel/models.py:1123 +#: agenda_culturel/models.py:1129 msgid "Events" msgstr "Événements" -#: agenda_culturel/models.py:1284 +#: agenda_culturel/models.py:1290 msgid "recurrent import" msgstr "import récurrent" -#: agenda_culturel/models.py:1286 +#: agenda_culturel/models.py:1292 msgid "a non authenticated user" msgstr "un utilisateur non connecté" -#: agenda_culturel/models.py:1769 +#: agenda_culturel/models.py:1775 msgid "Your event has been published" msgstr "Ton événement a été publié" -#: agenda_culturel/models.py:1774 +#: agenda_culturel/models.py:1780 msgid "Your message has not been retained" msgstr "Ton événement n'a pas été retenu" -#: agenda_culturel/models.py:1862 agenda_culturel/models.py:2685 +#: agenda_culturel/models.py:1868 agenda_culturel/models.py:2691 msgid "Warning" msgstr "Warning" -#: agenda_culturel/models.py:1864 agenda_culturel/models.py:1970 +#: agenda_culturel/models.py:1870 agenda_culturel/models.py:1976 msgid "the date has not been imported correctly." msgstr "la date n'a pas été importée correctement." -#: agenda_culturel/models.py:1952 +#: agenda_culturel/models.py:1958 msgid "during import process" msgstr "pendant le processus d'import" -#: agenda_culturel/models.py:1968 agenda_culturel/models.py:1978 -#: agenda_culturel/models.py:1989 +#: agenda_culturel/models.py:1974 agenda_culturel/models.py:1984 +#: agenda_culturel/models.py:1995 msgid "warning" msgstr "attention" -#: agenda_culturel/models.py:1980 +#: agenda_culturel/models.py:1986 msgid "the title has not been imported correctly." msgstr "le titre n'a pas été importé correctement." -#: agenda_culturel/models.py:1992 +#: agenda_culturel/models.py:1998 msgid "The import was unable to find an event in the page." msgstr "L'import a été incapable de trouver un événement dans la page." -#: agenda_culturel/models.py:2340 +#: agenda_culturel/models.py:2346 msgid "Updated field(s): " msgstr "Champ(s) mis à jour: " -#: agenda_culturel/models.py:2344 +#: agenda_culturel/models.py:2350 msgid "Update" msgstr "Mise à jour" -#: agenda_culturel/models.py:2345 +#: agenda_culturel/models.py:2351 msgid "update process" msgstr "processus de mise à jour" -#: agenda_culturel/models.py:2414 +#: agenda_culturel/models.py:2420 msgid "Import" msgstr "Import" -#: agenda_culturel/models.py:2415 +#: agenda_culturel/models.py:2421 msgid "import process" msgstr "processus d'import" -#: agenda_culturel/models.py:2417 +#: agenda_culturel/models.py:2423 msgid "" "The duration of the event is a little too long for direct publication. " "Moderators can choose to publish it or not." @@ -948,191 +952,191 @@ msgstr "" "La durée de l'événement est un peu trop longue pour qu'il soit publié " "directement. Les modérateurs peuvent choisir de le publier ou non." -#: agenda_culturel/models.py:2676 +#: agenda_culturel/models.py:2682 msgid "From contributor" msgstr "D'un·e contributeurice" -#: agenda_culturel/models.py:2677 +#: agenda_culturel/models.py:2683 msgid "Import process" msgstr "Processus d'import" -#: agenda_culturel/models.py:2678 +#: agenda_culturel/models.py:2684 msgid "Update process" msgstr "Processus de mise à jour" -#: agenda_culturel/models.py:2679 +#: agenda_culturel/models.py:2685 msgid "Contact form" msgstr "Formulaire de contact" -#: agenda_culturel/models.py:2680 +#: agenda_culturel/models.py:2686 msgid "Event report" msgstr "Signalemet d'événement" -#: agenda_culturel/models.py:2683 +#: agenda_culturel/models.py:2689 msgid "From contributor (without message)" msgstr "D'un·e contributeurice (sans message)" -#: agenda_culturel/models.py:2689 +#: agenda_culturel/models.py:2695 msgid "Messages" msgstr "Messages" -#: agenda_culturel/models.py:2698 +#: agenda_culturel/models.py:2704 msgid "Subject" msgstr "Sujet" -#: agenda_culturel/models.py:2699 +#: agenda_culturel/models.py:2705 msgid "The subject of your message" msgstr "Sujet de votre message" -#: agenda_culturel/models.py:2705 +#: agenda_culturel/models.py:2711 msgid "Related event" msgstr "Événement associé" -#: agenda_culturel/models.py:2706 +#: agenda_culturel/models.py:2712 msgid "The message is associated with this event." msgstr "Le message est associé à cet événement." -#: agenda_culturel/models.py:2714 +#: agenda_culturel/models.py:2720 msgid "Author of the message" msgstr "Auteur du message" -#: agenda_culturel/models.py:2722 +#: agenda_culturel/models.py:2728 msgid "Your name" msgstr "Votre nom" -#: agenda_culturel/models.py:2728 +#: agenda_culturel/models.py:2734 msgid "Email address" msgstr "Adresse email" -#: agenda_culturel/models.py:2735 +#: agenda_culturel/models.py:2741 msgid "Your message" msgstr "Votre message" -#: agenda_culturel/models.py:2742 +#: agenda_culturel/models.py:2748 msgid "This message is a spam." msgstr "Ce message est un spam." -#: agenda_culturel/models.py:2749 +#: agenda_culturel/models.py:2755 msgid "this message has been processed and no longer needs to be handled" msgstr "Ce message a été traité et ne nécessite plus d'être pris en charge" -#: agenda_culturel/models.py:2755 +#: agenda_culturel/models.py:2761 msgid "Comments on the message from the moderation team" msgstr "Commentaires sur ce message par l'équipe de modération" -#: agenda_culturel/models.py:2788 agenda_culturel/models.py:2964 +#: agenda_culturel/models.py:2794 agenda_culturel/models.py:2970 msgid "Recurrent import" msgstr "Import récurrent" -#: agenda_culturel/models.py:2789 +#: agenda_culturel/models.py:2795 msgid "Recurrent imports" msgstr "Imports récurrents" -#: agenda_culturel/models.py:2793 +#: agenda_culturel/models.py:2799 msgid "ical" msgstr "ical" -#: agenda_culturel/models.py:2794 +#: agenda_culturel/models.py:2800 msgid "ical no busy" msgstr "ical sans busy" -#: agenda_culturel/models.py:2795 +#: agenda_culturel/models.py:2801 msgid "ical no VC" msgstr "ical sans VC" -#: agenda_culturel/models.py:2796 +#: agenda_culturel/models.py:2802 msgid "ical naive timezone" msgstr "ical timezone naïve" -#: agenda_culturel/models.py:2797 +#: agenda_culturel/models.py:2803 msgid "lacoope.org" msgstr "lacoope.org" -#: agenda_culturel/models.py:2798 +#: agenda_culturel/models.py:2804 msgid "la comédie" msgstr "la comédie" -#: agenda_culturel/models.py:2799 +#: agenda_culturel/models.py:2805 msgid "le fotomat" msgstr "le fotomat" -#: agenda_culturel/models.py:2800 +#: agenda_culturel/models.py:2806 msgid "la puce à l'oreille" msgstr "la puce à loreille" -#: agenda_culturel/models.py:2801 +#: agenda_culturel/models.py:2807 msgid "Plugin wordpress MEC" msgstr "Plugin wordpress MEC" -#: agenda_culturel/models.py:2802 +#: agenda_culturel/models.py:2808 msgid "Événements d'une page FB" msgstr "Événements d'une page FB" -#: agenda_culturel/models.py:2803 +#: agenda_culturel/models.py:2809 msgid "Billetterie Clermont-Ferrand" msgstr "" -#: agenda_culturel/models.py:2804 +#: agenda_culturel/models.py:2810 msgid "Arachnée concert" msgstr "Arachnée concert" -#: agenda_culturel/models.py:2805 +#: agenda_culturel/models.py:2811 msgid "Le Rio" msgstr "Le Rio" -#: agenda_culturel/models.py:2806 +#: agenda_culturel/models.py:2812 msgid "La Raymonde" msgstr "La Raymone" -#: agenda_culturel/models.py:2807 +#: agenda_culturel/models.py:2813 msgid "Agenda apidae tourisme" msgstr "Agenda apidae tourisme" -#: agenda_culturel/models.py:2808 +#: agenda_culturel/models.py:2814 msgid "Agenda iguana (médiathèques)" msgstr "Agenda iguana (médiathèques)" -#: agenda_culturel/models.py:2809 +#: agenda_culturel/models.py:2815 msgid "Mille formes" msgstr "Mille Formes" -#: agenda_culturel/models.py:2810 +#: agenda_culturel/models.py:2816 msgid "Les Amis du Temps des Cerises" msgstr "Les Amis du Temps des Cerises" -#: agenda_culturel/models.py:2811 +#: agenda_culturel/models.py:2817 msgid "Mobilizon" msgstr "Mobilizon" -#: agenda_culturel/models.py:2812 +#: agenda_culturel/models.py:2818 msgid "Le caméléon" msgstr "" -#: agenda_culturel/models.py:2815 +#: agenda_culturel/models.py:2821 msgid "simple" msgstr "simple" -#: agenda_culturel/models.py:2816 +#: agenda_culturel/models.py:2822 msgid "Headless Chromium" msgstr "chromium sans interface" -#: agenda_culturel/models.py:2819 +#: agenda_culturel/models.py:2825 msgid "Headless Chromium (pause)" msgstr "chromium sans interface (pause)" -#: agenda_culturel/models.py:2825 +#: agenda_culturel/models.py:2831 msgid "daily" msgstr "chaque jour" -#: agenda_culturel/models.py:2827 +#: agenda_culturel/models.py:2833 msgid "weekly" msgstr "chaque semaine" -#: agenda_culturel/models.py:2828 +#: agenda_culturel/models.py:2834 msgid "never" msgstr "jamais" -#: agenda_culturel/models.py:2833 +#: agenda_culturel/models.py:2839 msgid "" "Recurrent import name. Be careful to choose a name that is easy to " "understand, as it will be public and displayed on the sites About page." @@ -1140,151 +1144,151 @@ msgstr "" "Nom de l'import récurrent. Attention à choisir un nom compréhensible, car il " "sera public, et affiché sur la page à propos du site." -#: agenda_culturel/models.py:2840 +#: agenda_culturel/models.py:2846 msgid "Processor" msgstr "Processeur" -#: agenda_culturel/models.py:2846 +#: agenda_culturel/models.py:2852 msgid "Downloader" msgstr "Téléchargeur" -#: agenda_culturel/models.py:2853 +#: agenda_culturel/models.py:2859 msgid "Import recurrence" msgstr "Récurrence d'import" -#: agenda_culturel/models.py:2860 +#: agenda_culturel/models.py:2866 msgid "Source" msgstr "Source" -#: agenda_culturel/models.py:2861 +#: agenda_culturel/models.py:2867 msgid "URL of the source document" msgstr "URL du document source" -#: agenda_culturel/models.py:2866 +#: agenda_culturel/models.py:2872 msgid "Browsable url" msgstr "URL navigable" -#: agenda_culturel/models.py:2868 +#: agenda_culturel/models.py:2874 msgid "URL of the corresponding document that will be shown to visitors." msgstr "URL correspondant au document et qui sera montrée aux visiteurs" -#: agenda_culturel/models.py:2877 +#: agenda_culturel/models.py:2883 msgid "Status of each imported event (published or draft)" msgstr "Status de chaque événement importé (publié ou brouillon)" -#: agenda_culturel/models.py:2882 +#: agenda_culturel/models.py:2888 msgid "Address for each imported event" msgstr "Adresse de chaque événement importé" -#: agenda_culturel/models.py:2889 +#: agenda_culturel/models.py:2895 msgid "Force location" msgstr "Focer la localisation" -#: agenda_culturel/models.py:2890 +#: agenda_culturel/models.py:2896 msgid "force location even if another is detected." msgstr "Forcer la localisation même si une autre a été détectée." -#: agenda_culturel/models.py:2896 +#: agenda_culturel/models.py:2902 msgid "Organiser" msgstr "Organisateur" -#: agenda_culturel/models.py:2897 +#: agenda_culturel/models.py:2903 msgid "Organiser of each imported event" msgstr "Organisateur de chaque événement importé" -#: agenda_culturel/models.py:2907 +#: agenda_culturel/models.py:2913 msgid "Category of each imported event" msgstr "Catégorie de chaque événement importé" -#: agenda_culturel/models.py:2915 +#: agenda_culturel/models.py:2921 msgid "Tags for each imported event" msgstr "Étiquettes de chaque événement importé" -#: agenda_culturel/models.py:2916 +#: agenda_culturel/models.py:2922 msgid "A list of tags that describe each imported event." msgstr "Une liste d'étiquettes décrivant chaque événement importé" -#: agenda_culturel/models.py:2945 +#: agenda_culturel/models.py:2951 msgid "Running" msgstr "En cours" -#: agenda_culturel/models.py:2946 +#: agenda_culturel/models.py:2952 msgid "Canceled" msgstr "Annulé" -#: agenda_culturel/models.py:2947 +#: agenda_culturel/models.py:2953 msgid "Success" msgstr "Succès" -#: agenda_culturel/models.py:2948 +#: agenda_culturel/models.py:2954 msgid "Failed" msgstr "Erreur" -#: agenda_culturel/models.py:2951 +#: agenda_culturel/models.py:2957 msgid "Batch importation" msgstr "Importation par lot" -#: agenda_culturel/models.py:2952 +#: agenda_culturel/models.py:2958 msgid "Batch importations" msgstr "Importations par lot" -#: agenda_culturel/models.py:2965 +#: agenda_culturel/models.py:2971 msgid "Reference to the recurrent import processing" msgstr "Référence du processus d'import récurrent" -#: agenda_culturel/models.py:2973 +#: agenda_culturel/models.py:2979 msgid "URL (if not recurrent import)" msgstr "URL (si pas d'import récurrent)" -#: agenda_culturel/models.py:2974 +#: agenda_culturel/models.py:2980 msgid "Source URL if no RecurrentImport is associated." msgstr "URL source si aucun import récurrent n'est associé" -#: agenda_culturel/models.py:2989 +#: agenda_culturel/models.py:2995 msgid "Error message" msgstr "Votre message" -#: agenda_culturel/models.py:2993 +#: agenda_culturel/models.py:2999 msgid "Number of collected events" msgstr "Nombre d'événements collectés" -#: agenda_culturel/models.py:2996 +#: agenda_culturel/models.py:3002 msgid "Number of imported events" msgstr "Nombre d'événements importés" -#: agenda_culturel/models.py:2999 +#: agenda_culturel/models.py:3005 msgid "Number of updated events" msgstr "Nombre d'événements mis à jour" -#: agenda_culturel/models.py:3002 +#: agenda_culturel/models.py:3008 msgid "Number of removed events" msgstr "Nombre d'événements supprimés" -#: agenda_culturel/models.py:3010 +#: agenda_culturel/models.py:3016 msgid "Weight" msgstr "Poids" -#: agenda_culturel/models.py:3011 +#: agenda_culturel/models.py:3017 msgid "The lower is the weight, the earlier the filter is applied" msgstr "Plus le poids est léger, plus le filtre sera appliqué tôt" -#: agenda_culturel/models.py:3018 +#: agenda_culturel/models.py:3024 msgid "Category applied to the event" msgstr "Catégorie appliquée à l'événement" -#: agenda_culturel/models.py:3023 +#: agenda_culturel/models.py:3029 msgid "Contained in the title" msgstr "Contenu dans le titre" -#: agenda_culturel/models.py:3024 +#: agenda_culturel/models.py:3030 msgid "Text contained in the event title" msgstr "Texte contenu dans le titre de l'événement" -#: agenda_culturel/models.py:3030 +#: agenda_culturel/models.py:3036 msgid "Exact title extract" msgstr "Extrait exact du titre" -#: agenda_culturel/models.py:3032 +#: agenda_culturel/models.py:3038 msgid "" "If checked, the extract will be searched for in the title using the exact " "form (capitals, accents)." @@ -1292,19 +1296,19 @@ msgstr "" "Si coché, l'extrait sera recherché dans le titre en utilisant la forme " "exacte (majuscules, accents)" -#: agenda_culturel/models.py:3038 +#: agenda_culturel/models.py:3044 msgid "Contained in the description" msgstr "Contenu dans la description" -#: agenda_culturel/models.py:3039 +#: agenda_culturel/models.py:3045 msgid "Text contained in the description" msgstr "Texte contenu dans la description" -#: agenda_culturel/models.py:3045 +#: agenda_culturel/models.py:3051 msgid "Exact description extract" msgstr "Extrait exact de description" -#: agenda_culturel/models.py:3047 +#: agenda_culturel/models.py:3053 msgid "" "If checked, the extract will be searched for in the description using the " "exact form (capitals, accents)." @@ -1312,19 +1316,19 @@ msgstr "" "Si coché, l'extrait sera recherché dans la description en utilisant la forme " "exacte (majuscules, accents)" -#: agenda_culturel/models.py:3053 +#: agenda_culturel/models.py:3059 msgid "Contained in the location" msgstr "Contenu dans la localisation" -#: agenda_culturel/models.py:3054 +#: agenda_culturel/models.py:3060 msgid "Text contained in the event location" msgstr "Texte contenu dans la localisation de l'événement" -#: agenda_culturel/models.py:3060 +#: agenda_culturel/models.py:3066 msgid "Exact location extract" msgstr "Extrait exact de localisation" -#: agenda_culturel/models.py:3062 +#: agenda_culturel/models.py:3068 msgid "" "If checked, the extract will be searched for in the location using the exact " "form (capitals, accents)." @@ -1332,15 +1336,15 @@ msgstr "" "Si coché, l'extrait sera recherché dans la localisation en utilisant la " "forme exacte (majuscules, accents)" -#: agenda_culturel/models.py:3070 +#: agenda_culturel/models.py:3076 msgid "Location from place" msgstr "Localisation depuis le lieu" -#: agenda_culturel/models.py:3079 +#: agenda_culturel/models.py:3085 msgid "Categorisation rule" msgstr "Règle de catégorisation" -#: agenda_culturel/models.py:3080 +#: agenda_culturel/models.py:3086 msgid "Categorisation rules" msgstr "Règles de catégorisation" diff --git a/src/agenda_culturel/migrations/0163_alter_tag_name.py b/src/agenda_culturel/migrations/0163_alter_tag_name.py new file mode 100644 index 0000000..7dba70d --- /dev/null +++ b/src/agenda_culturel/migrations/0163_alter_tag_name.py @@ -0,0 +1,25 @@ +# Generated by Django 4.2.19 on 2025-04-03 19:36 + +import agenda_culturel.models +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("agenda_culturel", "0162_siteconfiguration_site_url"), + ] + + operations = [ + migrations.AlterField( + model_name="tag", + name="name", + field=models.CharField( + help_text="Tag name", + max_length=512, + unique=True, + validators=[agenda_culturel.models.no_slash_validator], + verbose_name="Name", + ), + ), + ] diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index f1598cb..83c5265 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -49,6 +49,7 @@ from django.db.models.expressions import RawSQL from django.templatetags.static import static from django.conf import settings from solo.models import SingletonModel +from django.core.exceptions import ValidationError from .calendar import CalendarDay from .import_tasks.extractor import Extractor @@ -64,6 +65,11 @@ logger = logging.getLogger(__name__) to_be_translated = [_("mean"), _("median"), _("maximum"), _("minimum"), _("stdev")] +def no_slash_validator(value): + if "/" in value: + raise ValidationError(_("The '/' character is not allowed.")) + + class SiteConfiguration(SingletonModel): site_name = models.CharField( verbose_name=_("Site name"), max_length=255, default="Pommes de lune" @@ -318,6 +324,7 @@ class Tag(models.Model): help_text=_("Tag name"), max_length=512, unique=True, + validators=[no_slash_validator], ) description = CKEditor5Field(