-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Migration vers le DSFR (#1323)
Co-authored-by: madjid.asa <[email protected]> Co-authored-by: Raphael Odini <[email protected]>
- Loading branch information
1 parent
75aaa42
commit 05c2d85
Showing
376 changed files
with
289,478 additions
and
8,906 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# from django.contrib import admin | ||
|
||
|
||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class BlogConfig(AppConfig): | ||
default_auto_field = "django.db.models.BigAutoField" | ||
name = "blog" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from django.utils.translation import gettext_lazy as _ | ||
from wagtail import blocks | ||
from wagtail.images.blocks import ImageChooserBlock | ||
|
||
from content_manager.blocks import ImageAndTextBlock, MultiColumnsWithTitleBlock, QuoteBlock | ||
|
||
|
||
class ContactCardBlock(blocks.StructBlock): | ||
name = blocks.CharBlock(label=_("Name"), max_length=255) | ||
role = blocks.CharBlock(label=_("Role"), max_length=255) | ||
organization = blocks.CharBlock(label=_("Organization"), max_length=255) | ||
contact_info = blocks.CharBlock(label=_("Contact info"), max_length=500, required=False) | ||
image = ImageChooserBlock(label="Image") | ||
|
||
class Meta: | ||
icon = "user" | ||
template = ("blog/blocks/contact_card.html",) | ||
|
||
|
||
COLOPHON_BLOCKS = [ | ||
("paragraph", blocks.RichTextBlock(label=_("Rich text"))), | ||
( | ||
"imageandtext", | ||
ImageAndTextBlock(label="Bloc image et texte"), | ||
), | ||
("quote", QuoteBlock(label="Citation")), | ||
("multicolumns", MultiColumnsWithTitleBlock(label="Multi-colonnes")), | ||
("contact_card", ContactCardBlock(label=_("Contact card"))), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
# SOME DESCRIPTIVE TITLE. | ||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | ||
# This file is distributed under the same license as the PACKAGE package. | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: \n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-07-11 17:35+0200\n" | ||
"PO-Revision-Date: 2024-07-11 17:36+0200\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"Language: fr\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n > 1);\n" | ||
"X-Generator: Poedit 3.4.2\n" | ||
|
||
#: blog/blocks.py:9 blog/models.py:348 blog/models.py:365 | ||
msgid "Name" | ||
msgstr "Nom" | ||
|
||
#: blog/blocks.py:10 blog/models.py:366 | ||
msgid "Role" | ||
msgstr "Fonction" | ||
|
||
#: blog/blocks.py:11 blog/models.py:360 | ||
msgid "Organization" | ||
msgstr "Organisation" | ||
|
||
#: blog/blocks.py:12 blog/models.py:368 | ||
msgid "Contact info" | ||
msgstr "Informations de contact" | ||
|
||
#: blog/blocks.py:21 | ||
msgid "Rich text" | ||
msgstr "Texte riche" | ||
|
||
#: blog/blocks.py:28 | ||
msgid "Contact card" | ||
msgstr "Carte contact" | ||
|
||
#: blog/models.py:36 | ||
msgid "Posts per page" | ||
msgstr "Articles par page" | ||
|
||
#: blog/models.py:40 blog/templates/blog/blog_index_page.html:76 | ||
msgid "Filter by category" | ||
msgstr "Filtrer par catégorie" | ||
|
||
#: blog/models.py:41 blog/templates/blog/blog_index_page.html:93 | ||
msgid "Filter by tag" | ||
msgstr "Filtrer par étiquette" | ||
|
||
#: blog/models.py:42 blog/templates/blog/blog_index_page.html:110 | ||
msgid "Filter by author" | ||
msgstr "Filtrer par auteur" | ||
|
||
#: blog/models.py:44 blog/templates/blog/blog_index_page.html:125 | ||
msgid "Filter by source" | ||
msgstr "Filtrer par source" | ||
|
||
#: blog/models.py:44 | ||
msgid "The source is the organization of the post author" | ||
msgstr "La source est l’organisation à laquelle appartient l’auteur de l’article" | ||
|
||
#: blog/models.py:56 | ||
msgid "Show filters" | ||
msgstr "Afficher les filtres" | ||
|
||
#: blog/models.py:63 | ||
msgid "Blog index" | ||
msgstr "Index de blog" | ||
|
||
#: blog/models.py:92 blog/templates/blog/tags_list_page.html:20 | ||
#: blog/views.py:149 | ||
msgid "Tags" | ||
msgstr "Étiquettes" | ||
|
||
#: blog/models.py:97 | ||
#, python-format | ||
msgid "Posts tagged with %(tag)s" | ||
msgstr "Articles avec l’étiquette %(tag)s" | ||
|
||
#: blog/models.py:110 blog/models.py:227 blog/models.py:323 | ||
#: blog/templates/blog/categories_list_page.html:20 blog/views.py:117 | ||
msgid "Categories" | ||
msgstr "Catégories" | ||
|
||
#: blog/models.py:115 | ||
#, python-format | ||
msgid "Posts in category %(category)s" | ||
msgstr "Articles dans la catégorie %(category)s" | ||
|
||
#: blog/models.py:126 blog/models.py:128 blog/models.py:139 blog/models.py:142 | ||
msgid "Posts written by" | ||
msgstr "Articles écrits par" | ||
|
||
#: blog/models.py:146 | ||
#, python-format | ||
msgid "Posts published in %(year)s" | ||
msgstr "Articles publiés en %(year)s" | ||
|
||
#: blog/models.py:229 | ||
msgid "Post date" | ||
msgstr "Date de publication" | ||
|
||
#: blog/models.py:231 | ||
msgid "Author entries can be created in Snippets > Persons" | ||
msgstr "Les auteurs peuvent être créés via Fragments > Personnes" | ||
|
||
#: blog/models.py:250 | ||
msgid "Scheduled publishing" | ||
msgstr "Publication planifiée" | ||
|
||
#: blog/models.py:258 | ||
msgid "Tags and Categories" | ||
msgstr "Étiquettes et Catégories" | ||
|
||
#: blog/models.py:266 | ||
msgid "Blog page" | ||
msgstr "Page de blog" | ||
|
||
#: blog/models.py:271 | ||
msgid "Category name" | ||
msgstr "Nom de la catégorie" | ||
|
||
#: blog/models.py:278 | ||
msgid "Parent category" | ||
msgstr "Catégorie parente" | ||
|
||
#: blog/models.py:285 | ||
msgid "Description" | ||
msgstr "Description" | ||
|
||
#: blog/models.py:286 | ||
msgid "Displayed on the top of the category page" | ||
msgstr "Affiché en haut de la page de la catégorie" | ||
|
||
#: blog/models.py:292 | ||
msgid "Text displayed at the end of every page in the category" | ||
msgstr "Texte affiché à la fin de chaque page de la catégorie" | ||
|
||
#: blog/models.py:303 | ||
msgid "Parent category cannot be self." | ||
msgstr "La catégorie ne peut être sa propre parente." | ||
|
||
#: blog/models.py:305 | ||
msgid "Cannot have circular Parents." | ||
msgstr "Il est impossible d’avoir des parents circulaires." | ||
|
||
#: blog/models.py:322 blog/models.py:334 | ||
msgid "Category" | ||
msgstr "Catégorie" | ||
|
||
#: blog/models.py:385 | ||
msgid "Person" | ||
msgstr "Personne" | ||
|
||
#: blog/templates/blog/blocks/blog_index_posts_list.html:36 | ||
msgid "No article found." | ||
msgstr "Aucun article trouvé." | ||
|
||
#: blog/templates/blog/blog_entry_page.html:75 | ||
msgid "Posted by:" | ||
msgstr "Écrit par :" | ||
|
||
#: blog/templates/blog/blog_index_page.html:71 | ||
#: blog/templates/blog/blog_index_page.html:73 | ||
msgid "Filters" | ||
msgstr "Filtres" | ||
|
||
#, python-format | ||
#~ msgid "Posts written by %(first_name)s %(last_name)s" | ||
#~ msgstr "Articles publiés par %(first_name)s %(last_name)s" | ||
|
||
#, fuzzy | ||
#~| msgid "Author" | ||
#~ msgid "Authors" | ||
#~ msgstr "Auteur" | ||
|
||
#~ msgid "Colophon" | ||
#~ msgstr "Colophon" | ||
|
||
#~ msgid "Header image" | ||
#~ msgstr "Image d’en-tête" | ||
|
||
#~ msgid "body" | ||
#~ msgstr "corps" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from django.db import models | ||
|
||
|
||
class CategoryManager(models.Manager): | ||
def with_uses(self, blog_page): | ||
entries = blog_page.get_entries() | ||
return self.filter(entrypage__in=entries).distinct() |
Oops, something went wrong.