Integrate the French government Design System into a Django app
Project description
Django-DSFR
Django-DSFR is a Django app to integrate the French government Design System (“Système de design de l’État français”).
This app was created as a part of Open Collectivités and is very much a work in progress. See the documentation (in French) for details.
Django-DSFR (partly) implements the version 1.1.0 of the DSFR.
Requirements
Tested with Python 3.8 and Django 3.2.5. Per vermin, it should work with Python >= 3.0, and it should work with old versions of Django too.
Quick start
Install with
pip install django-dsfr
.Add “dsfr” to your INSTALLED_APPS setting like this, before the app you want to use it with:
INSTALLED_APPS = [ ... 'dsfr', <your_app> ]
Include the tags in your base.html file:
# <your_app>/templates/<your_app>/base.html {% load static dsfr_tags %} <!doctype html> <html lang="fr" data-fr-theme="default"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> {% dsfr_css %} {% dsfr_favicon %} {% block extra_css %}{% endblock %} <title>MyApp</title> </head> <body> <main id="content"> {% block custom_header %} {% include "dsfr/header.html" %} {% endblock %} {% dsfr_theme_modale %} {% block content %}{% endblock %} {% include "dsfr/footer.html" %} </main> {% dsfr_js %} {% block extra_js %}{% endblock %} </body> </html>
Start the development server and visit http://127.0.0.1:8000/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_dsfr-0.4.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a6034497efc1d35ab3abd873c4c81861f3234f79298d7b948c7132767ba3a93 |
|
MD5 | 47d5b0ae9ae9c31ad7606d18d74e3025 |
|
BLAKE2b-256 | 5934314da39280f622ee2462354626be8d585482448cfe1dc5ab1deacadf8d21 |