#36872: Django's template engine cannot handle asynchronous methods
-------------------------------------+-------------------------------------
Reporter: Ricardo Robles | Owner: Ricardo
| Robles
Type: New feature | Status: assigned
Component: Template system | Version: 6.0
Severity: Normal | Resolution:
Keywords: Template, Async | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Carlton Gibson):
As small as the change is here, I can't help but thinking it makes little
sense. Async functions just aren't supported in the DTL... and what
purpose do they serve? Adding this auto-wrap in async_to_sync is a road to
where exactly? Nowhere. It's a very short cul-de-sac.
> I don't think anyone wants the current behavior with the memory address
of the coroutine rendered into the template (and RuntimeWarning at
shutdown for a coroutine not awaited).
If this is a genuine problem (which I'm not sure it is: "Just don't do
that" is often enough) raising an error here would be better. It's not
making a misleading promise that we won't later keep.
🤷
--
Ticket URL: <https://code.djangoproject.com/ticket/36872#comment:12>
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/0107019bec804d82-0edc5f97-04a4-48ae-bb31-5a12391a16cd-000000%40eu-central-1.amazonses.com.