Thanks, that solved the problem.

The example in the Django documents is somewhat misleading as they
first present a get_template example (to show the difference), which
I've mistaken for select_template.


On Apr 8, 9:01 am, Russell Keith-Magee <russ...@keith-magee.com>
wrote:
> Hi,
>
> loader.select_template() is expecting a list of values, and you're providing 
> a single value. However, Django interprets a string as a list of strings 
> (each one character long), so it doesn't raise an error due to the type of 
> the data; it only raises an error because the single-letter filename can't be 
> found.
>
> Make a call to loader.select_template(['test.html']), and everything should 
> work as expected.
>
> Yours,
> Russ Magee %-)
>
>
>
>
>
>
>
> On Sunday, 8 April 2012 at 4:01 AM, gnesher wrote:
> > Hi,
>
> > I'm receiving some odd results while playing with select_template
> > (Django 1.4)
>
> > I'm calling the following code in my view:
> > loader.select_template('test.html')
>
> > Which results in the following error:
>
> > TemplateDoesNotExist at /test
> > t, e, s, ., h, m, l
>
> > Can't really figure out what I'm doing wrong as this should be rather
> > straightforward.
>
> > Thanks
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com 
> > (mailto:django-users@googlegroups.com).
> > To unsubscribe from this group, send email to 
> > django-users+unsubscr...@googlegroups.com 
> > (mailto:django-users+unsubscr...@googlegroups.com).
> > For more options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to