[web2py] Re: rise HTML
if you are raising exceptions directly in the controller, you can
avoid the "extra" Xs doing something like

raise HTTP(404, ['message'])

(i.e. if an error message is of type "list" the Xs are not added)

Niphlod


On 11 Set, 16:28, mdipierro <[email protected]> wrote:
> You can.
>
> 1) copy routes.examples.py into routes.py
>
> 2) uncomment:
>
> error_message_ticket = '<html><body><h1>Internal error</h1>Ticket
> issued: <a href="\
> /admin/default/ticket/%(ticket)s" target="_blank">%(ticket)s</a></
> body></html>'
>
> you can edit the above message and make it whatever you like. You can
> also make the error customized per-app.
>
> Massimo
>
> On Sep 11, 7:03 am, "Sebastian E. Ovide" <[email protected]>
> wrote:
>
> > I see, an IE workaround...
>
> > do you think that it would make sense to allow the developer to disable this
> > IE workaround ? for example setting some config var ?
>
> > On Sat, Sep 11, 2010 at 2:31 AM, mdipierro <[email protected]> wrote:
> > > those xxxxx are very important! IE does not display the content of
> > > error pages unless the content is more than 512 bytes. Without the
> > > xxxxx (or some other junk) IE would override the web2py error
> > > messages.
>
> > > Massimo
>
> > > On Sep 10, 8:25 pm, "Sebastian E. Ovide" <[email protected]>
> > > wrote:
> > > > Hi All,
>
> > > > in the line class HTTP (
> > >http://www.google.com/codesearch/p?hl=en#uyCl3L51_dI/gluon/http.py&q=...)
> > > >  there is a code that adds xxxxxxx to the error page.
>
> > > > I'm using some JS library that would pop up the error page message in
> > > case
> > > > of an Ajax call returns an error page ... therefore it displays the
> > > message
> > > > that I rise in the controller plus those xxxx
>
> > > > Is it possible to disable those xxxxxx ?
>
> > > > thanks
>
> > > > --
> > > > Sebastian E. Ovide
>
> > --
> > Sebastian E. Ovide
>
>

Reply via email to