[Django] #27770: {% include %} with the template instance is broken under django 1.11

11 views
Skip to first unread message

Django

unread,
Jan 24, 2017, 3:45:39 AM1/24/17
to django-...@googlegroups.com
#27770: {% include %} with the template instance is broken under django 1.11
----------------------------------------------+------------------------
Reporter: Mikhail Podgurskiy | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.11
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
----------------------------------------------+------------------------
As stated in the django docs, the {% include %} tag could accept a
template instance to render -
https://docs.djangoproject.com/en/1.10/ref/templates/builtins/#include


{{{
include

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
https://code.djangoproject.com/ticket/27258 changeset

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

--
Ticket URL: <https://code.djangoproject.com/ticket/27770>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 24, 2017, 7:22:28 AM1/24/17
to django-...@googlegroups.com
#27770: {% include %} with the template instance is broken under django 1.11
------------------------------------+--------------------------------------

Reporter: Mikhail Podgurskiy | Owner: nobody
Type: Uncategorized | Status: closed
Component: Uncategorized | Version: 1.11
Severity: Normal | Resolution: duplicate

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------------+--------------------------------------
Changes (by Tim Graham):

* status: new => closed
* resolution: => duplicate


Comment:

Duplicate of #27722 which already has discussion.

--
Ticket URL: <https://code.djangoproject.com/ticket/27770#comment:1>

Reply all
Reply to author
Forward
0 new messages