#34197: method_decorator does not work with async views
------------------------------------------------+------------------------
Reporter: Hugo Osvaldo Barrera | Owner: nobody
Type: Uncategorized | Status: new
Component: Utilities | Version: 4.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
This:
@method_decorator(atomic, name="post")
Doesn't work on an async view:
ValueError: The view idf.sync.views.view didn't return an HttpResponse
object. It returned an unawaited coroutine instead. You may need to add an
'await' into your view.
The same view works without the decorator.
--
Ticket URL: <https://code.djangoproject.com/ticket/34197>
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/01070184d5dd5d61-c0753856-8fde-488d-873c-9467921c4184-000000%40eu-central-1.amazonses.com.