[Django] #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

5 views
Skip to first unread message

Django

unread,
Dec 13, 2017, 11:43:16 PM12/13/17
to django-...@googlegroups.com
#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.

Django

unread,
Dec 13, 2017, 11:43:55 PM12/13/17
to django-...@googlegroups.com
#28924: path function in Django 2.0 does not seem to work with django-rest-
framework's format_suffix_patterns function
-----------------------------+--------------------------------------

Reporter: Aakash Jha | Owner: nobody
Type: Bug | Status: new
Component: Core (URLs) | Version: 2.0
Severity: Normal | Resolution:

Keywords: path | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------

--
Ticket URL: <https://code.djangoproject.com/ticket/28924#comment:1>

Django

unread,
Dec 14, 2017, 2:04:28 AM12/14/17
to django-...@googlegroups.com
#28924: path function in Django 2.0 does not seem to work with django-rest-
framework's format_suffix_patterns function
-----------------------------+--------------------------------------

Reporter: Aakash Jha | Owner: nobody
Type: Bug | Status: closed

Component: Core (URLs) | Version: 2.0
Severity: Normal | Resolution: invalid

Keywords: path | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by Simon Charette):

* status: new => closed
* resolution: => invalid


Comment:

Given no reason was provided about what Django's `path` is doing wrong I
believe this something that should be fixed on the DRF side.

Please re-open if you can provide more details about what Django is doing
wrong as simply reporting that a third party feature is not working as
documented when used with a newly introduced Django feature strongly
indicates that the third party, DRF in this case, simply didn't add proper
support for `path` yet.

--
Ticket URL: <https://code.djangoproject.com/ticket/28924#comment:2>

Reply all
Reply to author
Forward
0 new messages