Skip to content

Commit

Permalink
Correction d'un hash d'intégrité vide pour un fichier CSS (#204)
Browse files Browse the repository at this point in the history
* fix(templatetags): integrity hash was passed to global_css.html

The problems:
* Template tag `dsfr_css` includes `global_css.html` template and passes `INTEGRITY_CSS_ICONS` which is never used by the template.
* Meanwhile, the template needs `INTEGRITY_UTILITY_CSS` and never gets it, so it renders an empty integrity hash.

* chore: bump lib version number
  • Loading branch information
David-Guillot authored Mar 3, 2025
1 parent 16e0e05 commit 9549f42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dsfr/templatetags/dsfr_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from dsfr.checksums import (
INTEGRITY_CSS,
INTEGRITY_UTILITY_CSS,
INTEGRITY_CSS_ICONS,
INTEGRITY_FAVICON_APPLE,
INTEGRITY_FAVICON_ICO,
Expand Down Expand Up @@ -58,7 +59,7 @@ def dsfr_css() -> dict:
"""
tag_data = {}
tag_data["INTEGRITY_CSS"] = INTEGRITY_CSS
tag_data["INTEGRITY_CSS_ICONS"] = INTEGRITY_CSS_ICONS
tag_data["INTEGRITY_UTILITY_CSS"] = INTEGRITY_UTILITY_CSS

return {"self": tag_data}

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "django-dsfr"
version = "2.1.0"
version = "2.1.1"
description = "Integrate the French government Design System into a Django app"
authors = [
{name = "Sylvain Boissel", email = "[email protected]"}
Expand Down

0 comments on commit 9549f42

Please sign in to comment.