#26109: Extra parameter check for loader.select_tamplate [Check if a string is
passed].
---------------------------------+-----------------------------
Reporter: ahmohamed | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: 1.9
Severity: Normal | Keywords: template loader
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+-----------------------------
Currently supplying a string to `select_template` raise an `IOError`,
which is not meaningful. Here's a sample.
IOError at XXX
[Errno 21] Is a directory: u'xxx/site-
packages/django/contrib/admin/templates'
It's better to check if `template_name_list` is actually a list
(`Iterable`). If it is a string, we can either
- Raise a TypeError and suggest to use `get_template` function instead.
- Pass the string to `get_template` silently.
I am creating a pull request going with the first option. Happy to change
it if necessary.
--
Ticket URL: <https://code.djangoproject.com/ticket/26109>
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/052.ef502199177cbe106880d78eeef6e4cf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.