Ola Tarkowska
2018-07-09 10:15:10 UTC
Hello,
Django==1.11.14
djangorestframework==3.8.2
I have been trying to resolve issue related to incorectly escaping reverse
url with params containing forward slash.
Constructing URL for the following pattern throws an exception as myparam
is not correctly encoded `foo/bar` rather then `foo%2Fbar`
My patterns:
1. ^v1/ ^endpoints/(?P<lineage>(.*))$ [name='endpoints-list']
2. ^v1/ ^endpoints/(?P<lineage>(.*))\.(?P<format>[a-z0-9]+)/?$
[name='endpoints-list']
3. ^v1/ ^endpoints/(?P<lineage>(.*))/something$
[name='endpoints-something-list']
4. ^v1/ ^endpoints/(?P<lineage>(.*))/something\.(?P<format>[a-z0-9]+)/?$
[name='endpoints-something-list']
That works in Django admin panel as it was fixed in https://code.djangoproject.com/ticket/22223
Am I doing somehting wrong?
Thanks in advance
Ola
Django==1.11.14
djangorestframework==3.8.2
I have been trying to resolve issue related to incorectly escaping reverse
url with params containing forward slash.
Constructing URL for the following pattern throws an exception as myparam
is not correctly encoded `foo/bar` rather then `foo%2Fbar`
My patterns:
1. ^v1/ ^endpoints/(?P<lineage>(.*))$ [name='endpoints-list']
2. ^v1/ ^endpoints/(?P<lineage>(.*))\.(?P<format>[a-z0-9]+)/?$
[name='endpoints-list']
3. ^v1/ ^endpoints/(?P<lineage>(.*))/something$
[name='endpoints-something-list']
4. ^v1/ ^endpoints/(?P<lineage>(.*))/something\.(?P<format>[a-z0-9]+)/?$
[name='endpoints-something-list']
That works in Django admin panel as it was fixed in https://code.djangoproject.com/ticket/22223
Am I doing somehting wrong?
Thanks in advance
Ola
--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.