Don't know if its relevant but have you seen: http://wiki.pylonshq.com/display/pylonsdocs/Error+Documents
? > -----Original Message----- > From: [email protected] [mailto:pylons- > [email protected]] On Behalf Of Christoph Haas > Sent: Thursday, January 22, 2009 7:24 AM > To: pylons-discuss > Subject: Details of an abort(403, ...) always end up as 'FORBIDDEN' > > 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
