-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
format_suffix_pattern not working with path() in django 2.0 #5672
Labels
Comments
Next step on that issue would be to write a failing test case. |
axnsan12
added a commit
to axnsan12/drf-yasg
that referenced
this issue
Dec 18, 2017
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.
6 tasks
I am having the same issue with the following urls.py file:
|
axnsan12
added a commit
to axnsan12/django-rest-framework
that referenced
this issue
Dec 20, 2017
axnsan12
added a commit
to axnsan12/django-rest-framework
that referenced
this issue
Dec 20, 2017
carltongibson
pushed a commit
that referenced
this issue
Dec 20, 2017
* Add failing test for #5672 * Add get_original_route to complement get_regex_pattern * [WIP] Fix path handling * needs more tests * maybe needs some refactoring * Add django 2 variant for all tests and fix trailing slash bug * Add more combinations to mixed path test
pchiquet
pushed a commit
to pchiquet/django-rest-framework
that referenced
this issue
Nov 17, 2020
…de#5691) * Add failing test for encode#5672 * Add get_original_route to complement get_regex_pattern * [WIP] Fix path handling * needs more tests * maybe needs some refactoring * Add django 2 variant for all tests and fix trailing slash bug * Add more combinations to mixed path test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checklist
master
branch of Django REST framework.Steps to reproduce
Expected behavior
when using format_suffix_patterns() from the rest_framwork.urlpatterns class, it should format the url pattern for url() from django.conf.urls as well as the newly introduced path() from django.urls
Actual behavior
getting an error when using path() in urlpatterns[], and then formatting it using the format_suffix_patterns() method
The text was updated successfully, but these errors were encountered: