django.template.base.TemplateDoesNotExist error_posts/errorpost_list.html

Raised by:

django/template/loader.py (line 76)

Traceback (most recent call last):
  File "python3.5/site-packages/django/core/handlers/base.py", line 164, in get_response
    response = response.render()
  File "python3.5/site-packages/django/template/response.py", line 158, in render
    self.content = self.rendered_content
  File "python3.5/site-packages/django/template/response.py", line 133, in rendered_content
    template = self._resolve_template(self.template_name)
  File "python3.5/site-packages/django/template/response.py", line 88, in _resolve_template
    new_template = self.resolve_template(template)
  File "python3.5/site-packages/django/template/response.py", line 78, in resolve_template
    return loader.select_template(template, using=self.using)
  File "python3.5/site-packages/django/template/loader.py", line 76, in select_template
    raise TemplateDoesNotExist(', '.join(template_name_list))
django.template.base.TemplateDoesNotExist: error_posts/errorpost_list.html

How to reproduce

Create a view that inherits from TemplateView and don't specify neither template_name attribute nor get_template_names() method.

How to fix

Make sure your view specifies template_name attribute or implements the method get_template_names().

For examples of template_name attribute usage, see (search for template_name): https://docs.djangoproject.com/en/1.9/intro/tutorial04/

For get_template_names() expected behavior, see: https://docs.djangoproject.com/en/1.9/ref/class-based-views/mixins-simple/#django.views.generic.base.TemplateResponseMixin.get_template_names