#30731: django.contrib.admindocs.utils.replace_named_groups() fails
substitution if
missing trailing /
-----------------------------------+--------------------------------------
Reporter: n2ygk | Owner: nobody
Type: Bug | Status: new
Component: contrib.admindocs | Version: 2.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
-----------------------------------+--------------------------------------
Comment (by n2ygk):
Here's execution of the example code:
{{{
(env) django-example$ python demo.py
path: entries/(?P<pk>[^/.]+)/relationships/(?P<related_field>\w+)
expected: entries/<pk>/relationships/<related_field>
got: entries/<pk>/relationships/(?P<related_field>\w+)
path_trailing:
entries/(?P<pk>[^/.]+)/relationships/(?P<related_field>\w+)/
expected: entries/<pk>/relationships/<related_field>/
got: entries/<pk>/relationships/<related_field>/
Traceback (most recent call last):
File "demo.py", line 21, in <module>
assert path == expected_path, "path without trailing slash didn't
match expected"
AssertionError: path without trailing slash didn't match expected
(env) django-example$
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30731#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.b50cdcf9b3ac5e2a5d9d031721f00e93%40djangoproject.com.