Integrate the French government Design System into a Django app
Project description
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 "core/blocks/header.html" %} {% endblock %} {% dsfr_theme_modale %} {% block content %}{% endblock %} {% include "core/blocks/footer_categories.html" %} {% include "core/blocks/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.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb7fd6424b50e1669db89bc7ed9e102acfa6015418e7006e3f4718fdf6b2eae9 |
|
MD5 | 1ebf8a3866cdd04014b18cd2055f464c |
|
BLAKE2b-256 | 3f342efcabe46bc12b0cb5741da004eaac7e12349545bdece2c9a543c2cf92f7 |