Skip to content

Commit 064db1a

Browse files
authored
Résoud un problème d’incompatibilité avec la façon dont le bloc {% title %} est défini dans d’autres apps (#257)
* Solves an issue with other django apps that define the block title as the inside of the title tag instead of the outside: allows to redefine it in an intermediary template * Update package version
1 parent 3db7c95 commit 064db1a

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

dsfr/templates/dsfr/base.html

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,22 @@
1313
{% block extra_css %}
1414
{% endblock extra_css %}
1515

16-
{% block title %}
17-
<title>
18-
{% if title and SITE_CONFIG.site_title %}
19-
{{ title }} — {{ SITE_CONFIG.site_title }}
20-
{% elif title %}
21-
{{ title }}
22-
{% elif SITE_CONFIG.site_title %}
23-
{{ SITE_CONFIG.site_title }}
24-
{% else %}
25-
{% translate "Untitled page" %}
26-
{% endif %}
27-
</title>
28-
{% endblock title %}
16+
{% block title_wrapper %}
17+
{% block title %}
18+
<title>
19+
{% if title and SITE_CONFIG.site_title %}
20+
{{ title }} — {{ SITE_CONFIG.site_title }}
21+
{% elif title %}
22+
{{ title }}
23+
{% elif SITE_CONFIG.site_title %}
24+
{{ SITE_CONFIG.site_title }}
25+
{% else %}
26+
{% translate "Untitled page" %}
27+
{% endif %}
28+
</title>
29+
{% endblock title %}
30+
{% endblock title_wrapper %}
31+
2932
<meta name="format-detection"
3033
content="telephone=no,date=no,address=no,email=no,url=no">
3134

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "django-dsfr"
3-
version = "3.1.0"
3+
version = "3.2.0"
44
description = "Integrate the French government Design System into a Django app"
55
authors = [{ name = "Sylvain Boissel", email = "[email protected]" }]
66
requires-python = "<4.0,>=3.10"
@@ -21,7 +21,6 @@ classifiers = [
2121
"Operating System :: OS Independent",
2222
"Intended Audience :: Developers",
2323
"License :: OSI Approved :: MIT License",
24-
"Operating System :: OS Independent",
2524
"Programming Language :: Python :: 3",
2625
"Programming Language :: Python :: 3.10",
2726
"Programming Language :: Python :: 3.11",

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)