from pyramid.view import notfound_view_config @notfound_view_config(renderer='ordr:templates/errors/404.jinja2') def notfound_view(context, request): ''' display a file not found page ''' request.response.status = 404 return {}