On 2013-05-11, at 15:57 , Larry Martell wrote: > > Yes, that is what I did. This is not in my urlconf. It's in a view > function. I replaced: > > return direct_to_template(request, template) > > by: > > return TemplateView.as_view(template_name=template) > > Is that not correct?
Indeed not, `TemplateView.as_view(template)` is roughly equivalent to `functools.partial(direct_to_template, template=template)`: it's only one half of the operation, which returns a callable replying to requests. You need something along the lines of `TemplateView.as_view(template)(request)` > Should I not be using as_view? I just tried using > TemplateView(template_name=template) and I got the same error. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.