Integrate the French government Design System into a Django app
Project description
DSFR is a Django app to integrate the French government Design System (“Système de design de l’État français”).
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
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 %} {% load 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
django-dsfr-0.1.2.tar.gz
(2.3 MB
view hashes)
Built Distribution
Close
Hashes for django_dsfr-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a16df9e1435245e69f915480c787461bba20360ba077b554b8f32d2f684e8615 |
|
MD5 | 167910fee3a28e195fd4e73ac9a88f65 |
|
BLAKE2b-256 | cd0e24659d9a62d8d282d8793d4f9af758cb624e0239356fb833f00c1f0b0421 |