Opened 6 years ago

Closed 6 years ago

#27770 closed Uncategorized (duplicate)

{% include %} with the template instance is broken under django 1.11

Reported by: Mikhail Podgurskiy Owned by: nobody
Component: Uncategorized Version: 1.11
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


As stated in the django docs, the {% include %} tag could accept a template instance to render -


Loads a template and renders it with the current context. This is a way of “including” other templates within a template.

The variable may also be any object with a render() method that accepts a context. This allows you to reference a compiled Template in your context.

This leads to RequestContext from the main template been passed to the included template.render method and this became prohibited within changeset

TypeError at ...
context must be a dict rather than RequestContext.

Change History (1)

comment:1 Changed 6 years ago by Tim Graham

Resolution: duplicate
Status: newclosed

Duplicate of #27722 which already has discussion.

Note: See TracTickets for help on using tickets.
Back to Top