In Django 1,8 it worked but in Django 1.11 it throws:
TypeError: context must be a dict rather than RequestContext.
The code is:
class EpilogueNode(template.Node):
def __init__(self): # noqa: D102
self.epilogue_template =
template.loader.get_template('themes/presenter_epilogue.html')
def render(self, context): # noqa: D102
rendered = self.epilogue_template.render(context)
In
https://docs.djangoproject.com/en/1.11/ref/templates/upgrading/ it
is documeted that I need to pass a dict as context, but the context
passed to Node,render is a
RequestContext.
How can I upgrade this to 1.11?
--
Best Regards,
Christian Ledermann
Newark-on-Trent - UK
Mobile :
+44 7474997517
https://uk.linkedin.com/in/christianledermann
https://github.com/cleder/
<*)))>{
If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.
1) Don’t drive species to extinction
2) Don’t destroy a habitat that species rely on.
3) Don’t change the climate in ways that will result in the above.
}<(((*>