#36731: Allow TemplateView classes to have an asynchronous get_context_data 
method
-------------------------------------+-------------------------------------
     Reporter:  rrobles              |                     Type:  Bug
       Status:  new                  |                Component:  Template
                                     |  system
      Version:  5.2                  |                 Severity:  Normal
     Keywords:  TemplateView,        |             Triage Stage:
  get_context_data, async            |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 Currently, you can't use an asynchronous `get_context_data` in a
 `TemplateView` because it throws the following error:

 `TypeError: context must be a dict rather than a coroutine`.

 I've proposed some changes in this Pull Request:

 https://github.com/django/django/pull/20081

 These changes include a check to see if the context is a coroutine so it
 can be handled correctly in `make_context`. This allows you to handle
 `get_context_data` correctly when it's asynchronous.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36731>
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/0107019a80e31f01-ac0e4d93-c2b5-4277-afc1-c3d1cdb238ff-000000%40eu-central-1.amazonses.com.

Reply via email to