Clean up Django 2 path backslashes
In Django 2, routes defines via urls.path are aggresively escaped when converted into regex. This is a naive fix which unescapes all characters outside capture groups, but in the context of OpenAPI is okay because regular expressions inside paths are not supported anyway. This issue affects django-rest-framework as well, as outlined in encode/django-rest-framework#5672, encode/django-rest-framework#5675.
This commit is contained in:
@@ -4,5 +4,5 @@ from users import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', views.UserList.as_view()),
|
||||
url(r'^(?P<pk>[0-9]+)/$', views.user_detail),
|
||||
url(r'^(?P<pk>\d+)/$', views.user_detail),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user