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
dot character excluded from viewset lookup_field url conf #2033
Comments
And here's the commit that broke this previous functionality 3cd15fb. The commit log shows that you're aware of the issue. I presume you don't intend to change it, so I'll close this issue. Anyone who finds this be aware that in order to allow periods in urlconf generated by the default router, you need to add |
I wonder why dot was excluded in the first place... |
Iirc dots interfer with the ability to add extension content type within urls - ie /myendpoint.json |
Thank you very very much! |
Somewhere between
djangorestframework==2.3.13
anddjangorestframework==2.4.4
the generated url conf for a ModelViewSet has changed to exclude '.' (period / dot) character. This means that your custom lookup_field cannot be a domain name, or some other string that includes this character.Given a view set such as:
The following urls are generated (
djangorestframework==2.3.13
):And now with
djangorestframework==2.4.4
:The
[^]
specifies an exclusion set, so[^/]
excludes all forward slashes, whilst[^/.]
excludes forward slashes and period (dot) characters.I believe there is no reason to restrict periods in URIs and this change should be reverted.
The text was updated successfully, but these errors were encountered: