#33350: never_cache()/cache_control() decorators raise error on duck-typed
requests.
-------------------------------------+-------------------------------------
Reporter: Terence Honles | Owner: Terence
| Honles
Type: Bug | Status: new
Component: HTTP handling | Version: 4.0
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by jason):
Replying to [comment:8 Mariusz Felisiak]:
> This error was added to catch misuses of `never_cache()` and
`cache_control()` decorators without `method_decorator()`.
Breaking functionality in order to provide a nice error message seems
backwards.
Then again, I can't think of a good excuse for DRF not to simply inherit
from HttpRequest.
I recently fell down a rabbit-hole of github issues that were closed
without resolution regarding this conflict, where DRF refuses to inherit
because "composition pattern", and django refuses not to check because
"nice error message" over and over.
Something has to give right?
--
Ticket URL: <https://code.djangoproject.com/ticket/33350#comment:11>
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.714f7b429e8a8cfaa1846b8e9bc17878%40djangoproject.com.