Re: [Django] #4278: get_template should accept a dirs argument

12 views
Skip to first unread message

Django

unread,
Feb 23, 2013, 7:59:56 AM2/23/13
to django-...@googlegroups.com
#4278: get_template should accept a dirs argument
---------------------------------+----------------------------------------
Reporter: amcnabb | Owner: berkerpeksag
Type: New feature | Status: assigned
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: tplrf-patched | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Changes (by berkerpeksag):

* owner: nobody => berkerpeksag
* status: new => assigned


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

Django

unread,
Sep 15, 2013, 5:55:25 PM9/15/13
to django-...@googlegroups.com
#4278: get_template should accept a dirs argument
---------------------------------+----------------------------------------
Reporter: amcnabb | Owner: berkerpeksag
Type: New feature | Status: assigned
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: tplrf-patched | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Changes (by berkerpeksag):

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


Comment:

I've opened a pull request on GitHub:
https://github.com/django/django/pull/1632

--
Ticket URL: <https://code.djangoproject.com/ticket/4278#comment:12>

Django

unread,
Sep 18, 2013, 7:41:08 AM9/18/13
to django-...@googlegroups.com
#4278: get_template should accept a dirs argument
---------------------------------+----------------------------------------
Reporter: amcnabb | Owner: berkerpeksag
Type: New feature | Status: closed

Component: Template system | Version: master
Severity: Normal | Resolution: fixed

Keywords: tplrf-patched | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"2f0566fa61e13277364e3aef338fa5c143f5a704"]:
{{{
#!CommitTicketReference repository=""
revision="2f0566fa61e13277364e3aef338fa5c143f5a704"
Fixed #4278 -- Added a dirs parameter to a few functions to override
TEMPLATE_DIRS.

* django.template.loader.get_template()
* django.template.loader.select_template()
* django.shortcuts.render()
* django.shortcuts.render_to_response()

Thanks amcnabb for the suggestion.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/4278#comment:13>

Django

unread,
Aug 23, 2014, 7:28:49 PM8/23/14
to django-...@googlegroups.com
#4278: get_template should accept a dirs argument
---------------------------------+----------------------------------------
Reporter: amcnabb | Owner: berkerpeksag
Type: New feature | Status: closed
Component: Template system | Version: master
Severity: Normal | Resolution: fixed
Keywords: tplrf-patched | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------

Comment (by toddreed):

The new `dirs` parameters doesn't quite behave like I expected because
`dirs` is only used to find the top level template. If the template has an
include tag, it reverts to the template directories listed in
TEMPLATE_DIRS and does not use the directories listed in `dirs`.

--
Ticket URL: <https://code.djangoproject.com/ticket/4278#comment:14>

Django

unread,
Sep 14, 2014, 2:33:21 PM9/14/14
to django-...@googlegroups.com
#4278: get_template should accept a dirs argument
---------------------------------+----------------------------------------
Reporter: amcnabb | Owner: berkerpeksag
Type: New feature | Status: closed
Component: Template system | Version: master
Severity: Normal | Resolution: fixed
Keywords: tplrf-patched | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------

Comment (by aaugustin):

I'm also finding the change weird.

For instance, when the dirs parameter is passed, the `app_directories`
loader starts behaving like the `filesystem` template loader, while the
`eggs` template loader ignores it entirely. It looks like this ticket
doesn't account for template loaders other than `filesystem`.

--
Ticket URL: <https://code.djangoproject.com/ticket/4278#comment:15>

Django

unread,
Nov 23, 2014, 4:02:41 PM11/23/14
to django-...@googlegroups.com
#4278: get_template should accept a dirs argument
---------------------------------+----------------------------------------
Reporter: amcnabb | Owner: berkerpeksag
Type: New feature | Status: closed
Component: Template system | Version: master
Severity: Normal | Resolution: fixed
Keywords: tplrf-patched | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------

Comment (by Aymeric Augustin <aymeric.augustin@…>):

In [changeset:"17012b6936128fb771b98e4fa6d78caddd07a9a8"]:
{{{
#!CommitTicketReference repository=""
revision="17012b6936128fb771b98e4fa6d78caddd07a9a8"
Deprecated dirs argument to override TEMPLATE_DIRS.

Cancels 2f0566fa. Refs #4278.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/4278#comment:16>

Reply all
Reply to author
Forward
0 new messages