Skip to content

Commit

Permalink
Correction des liens affichés dans les Inline de l'administration (#1220
Browse files Browse the repository at this point in the history
)
  • Loading branch information
kolok committed Jan 16, 2025
1 parent 57ecdd6 commit e933c3a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion qfdmo/admin/acteur.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import orjson
from django import forms
from django.conf import settings
from django.contrib.admin.utils import quote
from django.contrib.gis import admin
from django.contrib.gis.forms.fields import PointField
from django.contrib.gis.geos import Point
Expand Down Expand Up @@ -318,8 +319,10 @@ def view_link(self, obj):
if obj.identifiant_unique:
return format_html(
'<a href="{}">{} ({})</a>',
# Comme dans le code de django : https://github.com/django/django/blob/6cfe00ee438111af38f1e414bd01976e23b39715/django/contrib/admin/models.py#L243
reverse(
"admin:qfdmo_revisionacteur_change", args=[obj.identifiant_unique]
"admin:qfdmo_revisionacteur_change",
args=[quote(obj.identifiant_unique)],
),
obj.nom,
obj.identifiant_unique,
Expand Down

0 comments on commit e933c3a

Please sign in to comment.