#24622: Response "context" and "templates" not available in the Test Client when
using Jinja2 - Django 1.8
-------------------------------------+------------------------------------
Reporter: rivantis | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 1.8
Severity: Normal | Resolution:
Keywords: jinja2, test client | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by MoritzS):
* cc: moritz.sichert@… (added)
Comment:
Would patching `django.template.backends.jinja2.Template.render()` instead
be a reasonable solution to the problem?
The advantage for that is that then future backends could be patched the
same way.
The disadvantage is that when patching that method only the `render()`
call to the first template will be caught, all renders triggered by the
template itself (e.g. by using inheritance) not.
Let me know if that sounds reasonable, then I'll work out a PR.
--
Ticket URL: <https://code.djangoproject.com/ticket/24622#comment:17>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.8e68ce7f64a6ecd149a30c098c4e0d47%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.