Use CreateView instead of TemplateView.