#33350: some view decorators do not work with Django REST framework in Django
4.0
--------------------------------+------------------------------------------
Reporter: Terence Honles | Owner: Terence Honles
Type: Bug | Status: new
Component: HTTP handling | Version: 4.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------------
Changes (by Mariusz Felisiak):
* cc: Tom Christie, Carlton Gibson (added)
Comment:
Replying to [comment:5 jason]:
> [https://github.com/encode/django-rest-
framework/blob/master/rest_framework/request.py#L140 Request] has never
inherited from `HttpRequest` which has been the source of many issues like
this even before 4.0. I am experiencing a lot of issues right now
converting Django method views into DRF class-based views right now
because all of the decorators keep breaking.
Sorry, I confused `HttpRequest` with `HttpResponse`. Nevertheless, IMO, if
DRF is duck typing `HttpRequest` it should be fixed in DRF, e.g. by adding
`__instancecheck__()`. What do you think Tom? I'm happy to provide a patch
to DRF.
--
Ticket URL: <https://code.djangoproject.com/ticket/33350#comment:6>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/071.7094d9695350bcdf3d7012c5f46ab05e%40djangoproject.com.