@@ -58,24 +58,27 @@ class ErrorController(BaseController):
c.site_name = config.get('title')
log.debug('### %s ###' % (resp and resp.status or 'no response'))
e = request.environ
c.serv_p = r'%(protocol)s://%(host)s/' % {
'protocol': e.get('wsgi.url_scheme'),
'host': e.get('HTTP_HOST'), }
if resp:
c.error_message = cgi.escape(request.GET.get('code',
str(resp.status)))
c.error_explanation = self.get_error_explanation(resp.status_int)
else:
c.error_message = _('No response')
c.error_explanation = _('Unknown error')
return render('/errors/error_document.html')
def img(self, id):
"""Serve Pylons' stock images"""
return self._serve_file(os.path.join(media_path, 'img', id))
def style(self, id):
"""Serve Pylons' stock stylesheets"""
return self._serve_file(os.path.join(media_path, 'style', id))
def _serve_file(self, path):
Status change: