Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

[Django] #36393: _5C in pk of related model turns into back slash (\) in admin url

5 views
Skip to first unread message

Django

unread,
May 14, 2025, 5:14:53 PMMay 14
to django-...@googlegroups.com
#36393: _5C in pk of related model turns into back slash (\) in admin url
---------------------------------+-----------------------------------------
Reporter: Nikolay Fedorov | Type: Bug
Status: new | Component: contrib.admin
Version: 5.2 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+-----------------------------------------
I have two models: a Video and a Question. The "video" field in the
Question model is a ForeignKey to the video model. If the video has pk =
{{{'Ml_XFX_5CYo'}}} and it is assigned to a question, then when you try to
view or edit the video from the question page in the admin section,
clicking on the link results in an error that the video with pk =
{{{'Ml_XFX\Yo'}}} does not exist. For some reason, when trying to access
the video from the question card, {{{'Ml_XFX_5CYo'}}} turns into
{{{'Ml_XFX\Yo'}}}. I think problem on
{{{django.contrib.admin.utils.quote}}} function (maybe not). Presumably,
the problem is that the url conversion or protection mechanism considers
{{{_5C}}} as {{{%5C}}} and Ml_XFX**_5C**Yo' turns into 'Ml_XFX**\**Yo'.
--
Ticket URL: <https://code.djangoproject.com/ticket/36393>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 14, 2025, 5:15:10 PMMay 14
to django-...@googlegroups.com
#36393: _5C in pk of related model turns into back slash (\) in admin url
---------------------------------+--------------------------------------
Reporter: Nikolay Fedorov | Owner: (none)
Type: Bug | Status: new
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by Nikolay Fedorov):

* Attachment "Снимок экрана 2025-05-14 в 23.58.57.png" added.

Django

unread,
May 14, 2025, 5:15:10 PMMay 14
to django-...@googlegroups.com
#36393: _5C in pk of related model turns into back slash (\) in admin url
---------------------------------+--------------------------------------
Reporter: Nikolay Fedorov | Owner: (none)
Type: Bug | Status: new
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by Nikolay Fedorov):

* Attachment "Снимок экрана 2025-05-14 в 23.58.41.png" added.

Django

unread,
May 14, 2025, 5:15:11 PMMay 14
to django-...@googlegroups.com
#36393: _5C in pk of related model turns into back slash (\) in admin url
---------------------------------+--------------------------------------
Reporter: Nikolay Fedorov | Owner: (none)
Type: Bug | Status: new
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by Nikolay Fedorov):

* Attachment "Снимок экрана 2025-05-14 в 23.59.25.png" added.

Django

unread,
May 15, 2025, 3:04:41 AMMay 15
to django-...@googlegroups.com
#36393: _5C in pk of related model turns into back slash (\) in admin url
---------------------------------+--------------------------------------
Reporter: Nikolay Fedorov | Owner: (none)
Type: Bug | Status: closed
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by Sarah Boyce):

* resolution: => duplicate
* status: new => closed

Comment:

Thank you for the report! I replicated and think this is a duplicate of
#30386
--
Ticket URL: <https://code.djangoproject.com/ticket/36393#comment:1>
Reply all
Reply to author
Forward
0 new messages