#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.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/057.bd938bd14c0602b1804201db8725f58a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.