#28924: path function in Django 2.0 does not seem to work with django-rest-
framework's format_suffix_patterns function that is used to refer to a
specific response format
---------------------------------------+------------------------
Reporter: Aakash Jha | Owner: nobody
Type: Bug | Status: new
Component: Core (URLs) | Version: 2.0
Severity: Normal | Keywords: path
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------+------------------------
The newly introduced '''path()''' function in '''django.urls''' does not
work with '''format_suffix_patterns()''' function of
'''rest_framework.urlpatterns'''.
As mentioned in http://www.django-rest-framework.org/tutorial/2-requests-
and-responses/ , in order to receive a response from the api server in the
desired format, a '''.json''' or '''.api''' might be appended with the
url. This does not seem to work when the '''urlpattern[]''' has its urls
mentioned in the new '''path()''' function.
When I switched back to using '''url()''' in '''urlpatterns[]''', the
issue was resolved.
--
Ticket URL: <https://code.djangoproject.com/ticket/28924>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/055.21b17dcab1eb30fd4ddefe220f260504%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.