The ExtraContextMixin overrides only the get_context_data method. If we use a base view class which does not use this method the mixin does not take effect. Django's TemplateView uses this method but it also uses a TemplateResponse object instead of a normal HttpResponse object. This special class expects that the content was rendered before you can iterate over it. In our ErrorView case Django's error view handler does not render the content but iterates over the response object. This causes an error. I don't know whether this is a bug in Django or simply a styling thing: Don't use TemplateResponse objects for error views.