#31949: Allow builtin view decorators to be applied directly to async views.
--------------------------------+-------------------------------------
Reporter: Michael Galler | Owner: Ben Lomax
Type: New feature | Status: assigned
Component: Core (Other) | Version: 3.1
Severity: Normal | Resolution:
Keywords: async | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+-------------------------------------
Comment (by Ben Lomax):
I've created a couple more PRs which I //think// cover all of the
remaining non-`decorator_from_middleware` decorators (and excellent work
on the sensitive parameter decorators by the way 😄):
* [https://github.com/django/django/pull/17055 Made @csrf_exempt decorator
work with async functions]
* [https://github.com/django/django/pull/17056 Made
@vary_on_(cookie/headers) decorators work with async functions]
For the `decorator_from_middleware` decorators, I've put together a
[https://github.com/django/django/pull/17057 proof of concept (POC) draft
PR], with a few notes:
1. It only implements tests for `gzip_page`, to make sure that it actually
works for at least one of the affected decorators.
2. The second commit attempts to DRY up the code (as there is a //lot// of
code duplication otherwise), but I'm not convinced it's actually helpful.
3. I've not added any documentation.
This POC PR is meant to act as a place to have a conversation which can
point to specific code changes, rather than a solution that I feel
strongly about 🙂
--
Ticket URL: <https://code.djangoproject.com/ticket/31949#comment:47>
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/01070189378a8b68-dee82dab-6051-4430-8b60-3a9ed8378059-000000%40eu-central-1.amazonses.com.