#28966 closed Cleanup/optimization (fixed)
Document that the UUID URL path converter requires dashes
Reported by: | Jahongir | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 2.0 |
Severity: | Normal | Keywords: | urls |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I have this url path:
path('driver/<uuid:driver_guid>/logs/', views.LogListView.as_view(), name='list-logs'),
If I try this: reverse('list-logs', kwargs={'driver_guid': '3d2dde2ef06d465283c8849e9eba7bae'})
, it does not find the path because the guid does not have '-'.
If I try reverse('list-logs', kwargs={'driver_guid': '3d2dde2e-f06d-4652-83c8-849e9eba7bae'})
it does work.
The problem is that 3d2dde2ef06d465283c8849e9eba7bae
is also a valid uuid.
I think it should be recognized as well.
Change History (3)
comment:1 by , 7 years ago
Component: | Core (URLs) → Documentation |
---|---|
Has patch: | set |
Summary: | GUID without "-" is not recognized by url path → Document that the UUID URL path converter requires dashes |
Triage Stage: | Unreviewed → Accepted |
Type: | Bug → Cleanup/optimization |
Note:
See TracTickets
for help on using tickets.
I think the same rationale as #28883 (only lower case letters are accepted) applies here as well. PR to document that rationale a bit more.