Re: [Django] #3544: Fix {% include %} to allow recursive includes

7 views
Skip to first unread message

Django

unread,
Aug 12, 2011, 12:13:33 PM8/12/11
to django-...@googlegroups.com
#3544: Fix {% include %} to allow recursive includes
-------------------------------------+-------------------------------------
Reporter: David | Owner: nobody
Danier <goliath.mailinglist@…> | Status: new
Type: New | Component: Template system
feature | Severity: Normal
Milestone: | Keywords: tplrf-patched
Version: SVN | Has patch: 0
Resolution: | Needs tests: 1
Triage Stage: Accepted | Easy pickings: 0
Needs documentation: 1 |
Patch needs improvement: 1 |
UI/UX: 0 |
-------------------------------------+-------------------------------------
Changes (by Mnewman):

* cc: newmaniese@… (added)
* ui_ux: => 0
* easy: => 0


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

Django

unread,
Sep 7, 2011, 10:22:12 AM9/7/11
to django-...@googlegroups.com
#3544: Fix {% include %} to allow recursive includes
-------------------------------------+-------------------------------------
Reporter: David | Owner: nobody
Danier <goliath.mailinglist@…> | Status: new
Type: New | Component: Template system
feature | Severity: Normal
Milestone: | Keywords: tplrf-patched
Version: SVN | Has patch: 0
Resolution: | Needs tests: 1
Triage Stage: Accepted | Easy pickings: 0
Needs documentation: 1 |
Patch needs improvement: 1 |
UI/UX: 0 |
-------------------------------------+-------------------------------------

Comment (by David Danier <david.danier@…>):

Needed this again and decided, that you currently can use
{{{
{% with template_name="file/to_include.html" %}{% include template_name
%}{% endwith %}
}}}
as an easy workaround.

--
Ticket URL: <https://code.djangoproject.com/ticket/3544#comment:27>

Django

unread,
Jan 2, 2012, 5:52:27 PM1/2/12
to django-...@googlegroups.com
#3544: Fix {% include %} to allow recursive includes
-------------------------------------+-------------------------------------
Reporter: David Danier | Owner: nobody
<goliath.mailinglist@…> | Status: new
Type: New feature | Version: SVN
Component: Template system | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: tplrf-patched | Needs documentation: 1
Has patch: 0 | Patch needs improvement: 1
Needs tests: 1 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by camilonova):

We should include this patch or document the workaround, it is needed when
you want to render information in a tree format, like the comments

--
Ticket URL: <https://code.djangoproject.com/ticket/3544#comment:28>

Django

unread,
Jan 3, 2012, 12:07:47 PM1/3/12
to django-...@googlegroups.com
#3544: Fix {% include %} to allow recursive includes
-------------------------------------+-------------------------------------
Reporter: David Danier | Owner: nobody
<goliath.mailinglist@…> | Status: new
Type: New feature | Version: SVN
Component: Template system | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: tplrf-patched | Needs documentation: 1
Has patch: 0 | Patch needs improvement: 1
Needs tests: 1 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by prestontimmons):

I added a patch to #16147.

It also addresses the problem of this patch, and lets includes happen
recursively.

--
Ticket URL: <https://code.djangoproject.com/ticket/3544#comment:29>

Django

unread,
Aug 29, 2012, 6:43:04 PM8/29/12
to django-...@googlegroups.com
#3544: Fix {% include %} to allow recursive includes
-------------------------------------+-------------------------------------
Reporter: David Danier | Owner: nobody
<goliath.mailinglist@…> | Status: new
Type: New feature | Version: master
Component: Template system | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: tplrf-patched | Needs documentation: 1
Has patch: 0 | Patch needs improvement: 1
Needs tests: 1 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by cvrebert):

* cc: cvrebert (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/3544#comment:30>

Django

unread,
Jan 30, 2013, 6:33:43 AM1/30/13
to django-...@googlegroups.com
#3544: Fix {% include %} to allow recursive includes
-------------------------------------+-------------------------------------
Reporter: David Danier | Owner: nobody
<goliath.mailinglist@…> | Status: new
Type: New feature | Version: master
Component: Template system | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: tplrf-patched | Needs documentation: 1
Has patch: 0 | Patch needs improvement: 1
Needs tests: 1 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by anonymous):

Any progress?

It seems quite demanded feature as soon as you deal with hierarchical
trees rendering.

--
Ticket URL: <https://code.djangoproject.com/ticket/3544#comment:31>

Django

unread,
Mar 18, 2013, 6:03:12 PM3/18/13
to django-...@googlegroups.com
#3544: Fix {% include %} to allow recursive includes
-------------------------------------+-------------------------------------
Reporter: David Danier | Owner: nobody
<goliath.mailinglist@…> | Status: new
Type: New feature | Version: master
Component: Template system | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: tplrf-patched | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by prestontimmons):

* needs_better_patch: 1 => 0
* has_patch: 0 => 1
* needs_tests: 1 => 0
* needs_docs: 1 => 0


Comment:

Updated the patch and added a pull request for review.

https://github.com/django/django/pull/920

--
Ticket URL: <https://code.djangoproject.com/ticket/3544#comment:32>

Django

unread,
Aug 24, 2013, 9:38:35 AM8/24/13
to django-...@googlegroups.com
#3544: Fix {% include %} to allow recursive includes
-------------------------------------+-------------------------------------
Reporter: David Danier | Owner: nobody
<goliath.mailinglist@…> | Status: new
Type: New feature | Version: master
Component: Template system | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: tplrf-patched | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by FunkyBob):

Whilst I agree we no longer need the separate classes, as we have the
caching template loader to cover the performance gain, I do question the
need for the "quiet" flag.

Under what circumstances do you seen someone wanting to do an include on a
template that may not exist?

--
Ticket URL: <https://code.djangoproject.com/ticket/3544#comment:33>

Django

unread,
Aug 29, 2013, 5:06:23 AM8/29/13
to django-...@googlegroups.com
#3544: Fix {% include %} to allow recursive includes
-------------------------------------+-------------------------------------
Reporter: David Danier | Owner: nobody
<goliath.mailinglist@…> | Status: new
Type: New feature | Version: master
Component: Template system | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: tplrf-patched | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by FunkyBob):

* cc: FunkyBob (added)


Comment:

I've made a PR for a simpler patch for this:

https://github.com/django/django/pull/1528

--
Ticket URL: <https://code.djangoproject.com/ticket/3544#comment:34>

Django

unread,
Aug 30, 2013, 1:44:35 AM8/30/13
to django-...@googlegroups.com
#3544: Fix {% include %} to allow recursive includes
-------------------------------------+-------------------------------------
Reporter: David Danier | Owner: nobody
<goliath.mailinglist@…> | Status: new
Type: New feature | Version: master
Component: Template system | Resolution:
Severity: Normal | Triage Stage: Ready for
Keywords: tplrf-patched | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by loic84):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/3544#comment:35>

Django

unread,
Aug 30, 2013, 3:48:04 AM8/30/13
to django-...@googlegroups.com
#3544: Fix {% include %} to allow recursive includes
-------------------------------------+-------------------------------------
Reporter: David Danier | Owner: nobody
<goliath.mailinglist@…> | Status: closed

Type: New feature | Version: master
Component: Template system | Resolution: fixed

Severity: Normal | Triage Stage: Ready for
Keywords: tplrf-patched | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Anssi Kääriäinen <akaariai@…>):

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


Comment:

In [changeset:"e2f06226ea4a38377cdb69f2f5768e4e00c2d88e"]:
{{{
#!CommitTicketReference repository=""
revision="e2f06226ea4a38377cdb69f2f5768e4e00c2d88e"
Improved {% include %} implementation

Merged BaseIncludeNode, ConstantIncludeNode and Include node.

This avoids raising TemplateDoesNotExist at parsing time, allows recursion
when passing a literal template name, and should make TEMPLATE_DEBUG
behavior
consistant.

Thanks loic84 for help with the tests.

Fixed #3544, fixed #12064, fixed #16147
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/3544#comment:36>

Reply all
Reply to author
Forward
0 new messages