rise HTML <!--xxxxxx

107,401 views
Skip to first unread message

Sebastian E. Ovide

unread,
Sep 10, 2010, 9:25:19 PM9/10/10
to web2py-users
Hi All,


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




mdipierro

unread,
Sep 10, 2010, 9:31:36 PM9/10/10
to web2py-users
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" <sebastian.ov...@gmail.com>
wrote:
> Hi All,
>
> in the line class HTTP (http://www.google.com/codesearch/p?hl=en#uyCl3L51_dI/gluon/http.py&q=...)

Sebastian E. Ovide

unread,
Sep 11, 2010, 8:03:01 AM9/11/10
to web...@googlegroups.com
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 ?
--
Sebastian E. Ovide



mdipierro

unread,
Sep 11, 2010, 10:28:28 AM9/11/10
to web2py-users
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" <sebastian.ov...@gmail.com>
wrote:

Niphlod

unread,
Sep 11, 2010, 6:57:01 PM9/11/10
to web2py-users
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

Iceberg

unread,
Sep 30, 2010, 7:37:25 AM9/30/10
to web2py-users
Thanks for the info. I remembered once I had same question but did not
find the answer.

But hey, why not just put all these "important" notes directly into
our code instead of those meaningless "xxxxx"? That way we combine
code and its document together. Perfect!
Reply all
Reply to author
Forward
0 new messages