How to customize "Invalid function/someview" ?

34 views
Skip to first unread message

Christian Varas

unread,
Apr 29, 2020, 3:33:42 PM4/29/20
to web...@googlegroups.com
Hello.

There is way to customize the "invalid function" 404 not found views ?
I would like to replace it with a custom html content.


image.png


Cheers.
Chris.

Annet

unread,
Apr 30, 2020, 5:13:08 AM4/30/20
to web2py-users
I think routes_onerror = [] in routes.py is whar you're
looking for:

routes_onerror = [
   ,(r'*/404', r'/handler/default/on_404_error')
   ,(r'*/*', r'/handler/default/onerror')
]

Kind regards,

Annet

Christian Varas

unread,
Apr 30, 2020, 1:02:02 PM4/30/20
to web...@googlegroups.com
Thanks for the help!

Now I have a custom 40x error pages :)

Cheers.
Chris.


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/0c7cfbd8-9a1f-4f07-ae3e-b23c9731a038%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages