#37124: AccessMixin: object HttpResponseRedirect can't be used in 'await'
expression
--------------------------------+--------------------------------------
Reporter: Johannes Maron | Owner: zky
Type: New feature | Status: assigned
Component: Uncategorized | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by Mykhailo Havelia):
* stage: Accepted => Unreviewed
* type: Bug => New feature
Comment:
I don't think this is really a bug, it's more that it was never
implemented, so I'd lean toward treating it as a new feature. 🙂
- LoginRequiredMixin
- PermissionRequiredMixin
- UserPassesTestMixin
These all rely heavily on sync code like `request.user`,
`request.user.has_perms`, etc.
Also, `request.user` and `request.auser()` don't share a cache, so you'd
end up doing two separate queries. To avoid that, I think we should adapt
the views for async properly instead of applying partial hot-fixes.
I feel like https://github.com/django/new-features is the right place to
discuss both the solution and the future design.
What do you all think?
--
Ticket URL: <https://code.djangoproject.com/ticket/37124#comment:8>
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 visit
https://groups.google.com/d/msgid/django-updates/0107019e85a50e47-13aa0aea-bfc5-4386-a334-48d2170730a7-000000%40eu-central-1.amazonses.com.