﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
16710	multiple templates per view in class based views do not work	tomaz.stucin@…	nobody	"If we have a cbv:

{{{
class IndexView(TemplateView):
    template_name = ['web/index.html', 'index.html']
}}}

and no matter if the template exists or not we always get the exception:

""sequence item 0: expected string, list found"" in ..Python-2.7.1/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/template/loader.py in select_template, line 203

The problem is that Django encloses the above array in an array, so {{{template_name_list = [['web/index.html', 'index.html']] }}} in select_template

The error is (i guess) in Django-1.3-py2.7.egg/django/views/generic/base.py in line 109 where we have:
{{{
return [self.template_name]
}}}
while it should be:
{{{
return self.template_name
}}}
it works for me but I am not sure if that fix is ok.

btw: I also checked the dev trunk and the array enclosing is still there

tnx
"	Bug	closed	Generic views	1.3	Normal	invalid			Unreviewed	0	0	0	0	0	0
