#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 jason):
* status: closed => new
* resolution: needsinfo =>
Comment:
Replying to [comment:4 Mariusz Felisiak]:
> I don't see how this can be a regression, these decorators use functions
from [https://docs.djangoproject.com/en/4.0/ref/utils/#module-
django.utils.cache django.utils.cache] which are documented as accepting
`HttpResponse` 🤔 Also `Response` defined in `django-rest-framework` is a
subclass of `HttpResponse`.
[https://github.com/encode/django-rest-
framework/blob/master/rest_framework/request.py#L140 Response] has never
inherited from `HttpResponse` 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.
--
Ticket URL: <https://code.djangoproject.com/ticket/33350#comment:5>
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.cd34bb5f2c94c8629f392445f97e7803%40djangoproject.com.