This release is a pre-release and may not be stable for production use.
wagtail_dsfr
Package Python pour Wagtail Dsfr, un gestionnaire de contenu permettant de créer et gérer un site internet basé sur le Système de design de l'État (DSFR), accessible et responsive.
Ce package est généré automatiquement à partir du projet Sites Faciles officiel.
Installation
pip install wagtail_dsfr
Ou avec poetry :
poetry add wagtail_dsfr
Utilisation
Ajoutez les applications à votre INSTALLED_APPS dans settings.py :
INSTALLED_APPS = [
# ... vos autres apps
"dsfr",
"wagtail_dsfr",
"wagtail_dsfr.blog",
"wagtail_dsfr.content_manager",
"wagtail_dsfr.events",
"wagtail.contrib.settings",
"wagtail.contrib.typed_table_block",
"wagtail.contrib.routable_page",
"wagtail_modeladmin",
"wagtailmenus",
"wagtailmarkdown",
]
Ajoutez les context processors nécessaires :
TEMPLATES[0]["OPTIONS"]["context_processors"].extend(
[
"wagtailmenus.context_processors.wagtailmenus",
"wagtail_dsfr.content_manager.context_processors.skiplinks",
"wagtail_dsfr.content_manager.context_processors.mega_menus",
]
)
Configurez les URLs dans votre urls.py :
# Option 1 : Utiliser directement la configuration d'URLs de wagtail_dsfr (recommandé)
from wagtail_dsfr.config.urls import *
# Option 2 : Configuration personnalisée
# Si vous avez besoin de personnaliser les URLs, vous pouvez copier le contenu
# de wagtail_dsfr.config.urls et l'adapter à vos besoins
Migration depuis Sites Faciles
Si vous migrez un site existant depuis le dépôt Sites Faciles vers ce package, vous devez mettre à jour les références ContentType dans votre base de données.
Étapes de migration
-
Installez le package comme décrit ci-dessus et ajoutez toutes les applications à
INSTALLED_APPS -
Exécutez les migrations Django pour créer les nouveaux ContentTypes :
python manage.py migrate
-
Migrez les ContentTypes existants :
python manage.py migrate_contenttype
Cette commande va :
- Identifier tous les ContentTypes de l'ancienne structure (blog, events, forms, content_manager, config)
- Mettre à jour toutes les pages Wagtail pour pointer vers les nouveaux ContentTypes
- Supprimer les anciens ContentTypes
-
Vérifiez la migration (optionnel - mode dry-run) :
python manage.py migrate_contenttype --dry-run
Pourquoi cette migration est nécessaire
Lorsque vous renommez des applications Django (par exemple de blog à wagtail_dsfr_blog), Django crée de nouveaux ContentTypes. Les pages Wagtail existantes référencent toujours les anciens ContentTypes, ce qui provoque l'erreur :
PageClassNotFoundError: The page 'xxx' cannot be edited because the model class
used to create it (blog.blogindexpage) can no longer be found in the codebase.
La commande migrate_contenttype résout ce problème en mettant à jour toutes les références.
Documentation
Pour plus d'informations sur l'utilisation de Sites Faciles, consultez la documentation officielle.
Licence
Ce projet est sous licence MIT - voir le fichier LICENSE pour plus de détails.
Crédits
Ce package est basé sur Sites Faciles développé par la DINUM.
Metadata
Release files for wagtail-dsfr 2.4.0rc2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wagtail_dsfr-2.4.0rc2.tar.gz | 5.2 MB | With provenance | Details for wagtail_dsfr-2.4.0rc2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wagtail_dsfr-2.4.0rc2-py3-none-any.whl | Python 3 | none | any | Details for wagtail_dsfr-2.4.0rc2-py3-none-any.whl |
Total release size: 10.7 MB
Release files / wagtail_dsfr-2.4.0rc2.tar.gz
| Download URL | wagtail_dsfr-2.4.0rc2.tar.gz |
|---|---|
| Size | 5.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0bb6092544565f6ebe7c0d4675d4be131c379d6bceb0403cd1d61e1c246595be
|
|
BLAKE2b-256 checksum How to use checksums |
a37b4d7fdaac9f62be1d2d9567b45d17401f3219a344b6a3a8316c59e3fd17ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2025.
Transparency logRelease files / wagtail_dsfr-2.4.0rc2-py3-none-any.whl
| Download URL | wagtail_dsfr-2.4.0rc2-py3-none-any.whl |
|---|---|
| Size | 5.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7d941cfd9643e4641be1cd8ed95eac4e61160d00e06048c30d0ab51312f4c01
|
|
BLAKE2b-256 checksum How to use checksums |
1f444f3db4c123e253a823a2a112c419ed44cd32d9a82b167ae34e71c1860a14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2025.
Transparency logSecurity for wagtail-dsfr 2.4.0rc2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for wagtail_dsfr-2.4.0rc2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.