#24538: Rendering a Jinja template with a context containing 'self' fails
---------------------------------+-------------------------------------
Reporter: tim_heap | Owner: charettes
Type: Bug | Status: new
Component: Template system | Version: 1.8rc1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+-------------------------------------
Changes (by tim_heap):
* status: closed => new
* resolution: wontfix =>
Comment:
Following some discussions on the [https://groups.google.com/forum/#!topic
/wagtail-developers/MxE6ImpVPCs Wagtail developer mailing list], we came
up with a potential solution: use both 'self' and 'page' in the context,
so that either template engine can be used, but without breaking backwards
compatibility with previous Wagtail versions using self, and without
breaking third party plugins.
As Jinja will silently ignore a self context variable in favour of its
own, this duplicate variable approach will work. Django just has to be
patched so that it does not throw an error when self is used. I will
construct a pull request fixing this shortly.
--
Ticket URL: <https://code.djangoproject.com/ticket/24538#comment:6>
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.22f68afac49547a35dc862a31620f2a7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.