Skip to main content

Integrate the French government Design System into a Django app

Project description

https://badge.fury.io/py/django-dsfr.svg https://github.com/entrepreneur-interet-general/django-dsfr/actions/workflows/django.yml/badge.svg https://github.com/entrepreneur-interet-general/django-dsfr/actions/workflows/codeql-analysis.yml/badge.svg

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.4 of the DSFR.

Requirements

Tested with Python 3.7/3.8/3.9 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

  1. Install with pip install django-dsfr.

  2. Add “dsfr” to INSTALLED_APPS in your settings.py like this, before the app you want to use it with:

    INSTALLED_APPS = [
        ...
        'dsfr',
        <your_app>
    ]
  3. (Optional) Add the context processor to your settings.py and create an instance of “DsfrConfig” in the admin panel:

    TEMPLATES = [
        {
            [...]
            "OPTIONS": {
                "context_processors": [
                    [...]
                    "dsfr.context_processors.site_config",
                ],
            },
        },
    ]
  4. Include the tags in your base.html file (see example file at https://github.com/entrepreneur-interet-general/django-dsfr/blob/main/example_app/templates/example_app/base.html)

  5. Start the development server and visit http://127.0.0.1:8000/

Project details


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.7.2.tar.gz (5.9 MB view hashes)

Uploaded Source

Built Distribution

django_dsfr-0.7.2-py3-none-any.whl (6.5 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page