[Django] #24685: EngineHandler doesn't raise exception when duplicate aliases are registered

6 views
Skip to first unread message

Django

unread,
Apr 22, 2015, 10:41:00 AM4/22/15
to django-...@googlegroups.com
#24685: EngineHandler doesn't raise exception when duplicate aliases are registered
---------------------------------+--------------------
Reporter: prestontimmons | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------
The `django.template.utils.EngineHandler` has a check to raise
`ImproperlyConfigured` if multiple engines are specified with the same
alias:

https://github.com/django/django/blob/master/django/template/utils.py#L72

This won't ever raise an error, though, because configuration is stored in
an `OrderedDict`. Duplicate aliases simply overwrite previous ones.

Curtis ran into this problem when using settings like this without the
`NAME` option:

{{{
TEMPLATES = [
{
'BACKEND': 'knights.django.KnightsTemplater',
...
},
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
...
},
]
}}}

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

Django

unread,
Apr 22, 2015, 10:43:11 AM4/22/15
to django-...@googlegroups.com
#24685: EngineHandler doesn't raise exception when duplicate aliases are registered
---------------------------------+------------------------------------

Reporter: prestontimmons | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: 1.8
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* needs_docs: => 0
* severity: Normal => Release blocker
* needs_tests: => 0
* stage: Unreviewed => Accepted


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

Django

unread,
Apr 22, 2015, 4:48:21 PM4/22/15
to django-...@googlegroups.com
#24685: EngineHandler doesn't raise exception when duplicate aliases are registered
---------------------------------+-------------------------------------
Reporter: prestontimmons | Owner: aaugustin
Type: Bug | Status: assigned

Component: Template system | Version: 1.8
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

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


Comment:

How embarrassing.

--
Ticket URL: <https://code.djangoproject.com/ticket/24685#comment:2>

Django

unread,
May 3, 2015, 3:44:41 PM5/3/15
to django-...@googlegroups.com
#24685: EngineHandler doesn't raise exception when duplicate aliases are registered
---------------------------------+-------------------------------------
Reporter: prestontimmons | Owner: aaugustin
Type: Bug | Status: assigned
Component: Template system | Version: 1.8
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/24685#comment:3>

Django

unread,
May 3, 2015, 8:20:27 PM5/3/15
to django-...@googlegroups.com
#24685: EngineHandler doesn't raise exception when duplicate aliases are registered
-------------------------------------+-------------------------------------

Reporter: prestontimmons | Owner: aaugustin
Type: Bug | Status: assigned
Component: Template system | Version: 1.8
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/24685#comment:4>

Django

unread,
May 4, 2015, 1:39:19 AM5/4/15
to django-...@googlegroups.com
#24685: EngineHandler doesn't raise exception when duplicate aliases are registered
-------------------------------------+-------------------------------------
Reporter: prestontimmons | Owner: aaugustin
Type: Bug | Status: closed

Component: Template system | Version: 1.8
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Aymeric Augustin <aymeric.augustin@…>):

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


Comment:

In [changeset:"1563b897c439370fe98e7902004cdcefc9ea5ceb" 1563b89]:
{{{
#!CommitTicketReference repository=""
revision="1563b897c439370fe98e7902004cdcefc9ea5ceb"
Fixed #24685 -- Fixed check for template name unicity.

Thanks Preston Timmons for the report.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24685#comment:5>

Django

unread,
May 4, 2015, 1:40:18 AM5/4/15
to django-...@googlegroups.com
#24685: EngineHandler doesn't raise exception when duplicate aliases are registered
-------------------------------------+-------------------------------------
Reporter: prestontimmons | Owner: aaugustin
Type: Bug | Status: closed
Component: Template system | Version: 1.8
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
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:"1f0a6082ec42db09a0c2ead3227150b833a73168" 1f0a6082]:
{{{
#!CommitTicketReference repository=""
revision="1f0a6082ec42db09a0c2ead3227150b833a73168"
[1.8.x] Fixed #24685 -- Fixed check for template name unicity.

Thanks Preston Timmons for the report.

Backport of 1563b89 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24685#comment:6>

Reply all
Reply to author
Forward
0 new messages