fix first param type of loader.select_template, fixes #255

must be a list of templates names, not a single template names.
This commit is contained in:
Thomas Waldmann 2016-08-13 22:23:02 +02:00
parent 9268a2a389
commit 51803eebec

View File

@ -91,7 +91,7 @@ class CustomTemplateView(TemplateView):
def dispatch(self, *args, **kwargs): def dispatch(self, *args, **kwargs):
self.template_name = 'main/custom/%s' % kwargs.get('template') self.template_name = 'main/custom/%s' % kwargs.get('template')
try: try:
template.loader.select_template(self.template_name) template.loader.select_template([self.template_name, ])
return super(CustomTemplateView, self).dispatch(*args, **kwargs) return super(CustomTemplateView, self).dispatch(*args, **kwargs)
except template.TemplateDoesNotExist: except template.TemplateDoesNotExist:
raise Http404 raise Http404