Dear list, I'm currently customizing the error messages in a Pylons project. And it seems like whenever I abort(403, 'foobar') my error template the request.params['message'] jusr contains 'FORBIDDEN' although I sent 'foobar' as the 'details' parameter. Grepping through the code it comes from lib/python2.5/site-packages/Paste-1.7.1-py2.5.egg/paste/wsgiwrappers.py.
My error controller:
class ErrorController(BaseController):
def document(self):
c.message = request.params.get('message', '-')
c.code = request.params.get('code', '-')
return render('/error.mako')
My template:
# -*- coding: utf-8 -*-
<%inherit file="/base.mako"/>
<h1>Error ${ c.code }</h1>
<p>
${ c.message }
</p>
What am I doing wrong? I'd like to use it like...
abort(403, "Sorry, this function is only for cute people.")
Cheers
Christoph
signature.asc
Description: This is a digitally signed message part.
