#16866: Handling empty list of candidates in select_template function
-----------------------------+---------------------------------
Reporter: Silver_Ghost | Owner: Silver_Ghost
Type: Bug | Status: new
Milestone: | Component: Template system
Version: SVN | Severity: Normal
Keywords: select_template | Triage Stage: Unreviewed
Has patch: 0 | Easy pickings: 1
UI/UX: 0 |
-----------------------------+---------------------------------
[https://code.djangoproject.com/browser/django/trunk/django/template/loader.py#L180
django.template.loader.select_template] expects list of template names and
select first loadable. If there are some template names in list and no one
from them couldn't be loaded then raising TemplateDoesNotExist exception
is the right decision. But if there isn't any template names in the list
then >>Template<<DoesNotExist is wrong exception, I think.
So maybe checks if list is empty and raise exception with message like "I
can't load any template for you because you didn't gave me any possible
variants"?
--
Ticket URL: <https://code.djangoproject.com/ticket/16866>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.