﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35953	Add composite PK admin support	Csirmaz Bendegúz		"This is a follow up to #373 (''CompositePrimaryKey'').

My proposal is to separate the primary key fields with a comma e.g. `/admin/posts/post/foo,bar/change`.

The comma is not escaped when used as a separator, but it is escaped (`%2C`) when part of the primary key's value.
e.g. `pk = (""The,quick"", ""brown"")` -> `/admin/posts/post/The%2Cquick,brown/change`

According to [https://datatracker.ietf.org/doc/html/rfc3986 RFC 3986], unesacped commas are allowed in URI paths (as far as I understand).

What if an existing, non-composite primary key contains a comma?
''While Django URL encodes commas in the admin URLs (see `QUOTE_MAP`), it must be able to look up objects by not-encoded PKs too.
The solution is simple. We must check if the model the user is trying access has a composite primary key or not.''

Since admin's `LogEntry` model uses ''""generic foreign keys""'', this ticket depends on #35941 (''composite GenericForeignKeys'').
"	New feature	new	contrib.admin	dev	Normal			Csirmaz Bendegúz	Unreviewed	0	0	0	0	0	0
