block entire app

36 views
Skip to first unread message

lucas

unread,
May 13, 2019, 11:44:54 PM5/13/19
to web2py-users
hey one and all,

where, in what model or controller, is the best place to place a few lines of code that captures every controller/function call in the entire app and returns a single page with a line of text and link to shuttle the viewers to another website.  and what would be those few lines of code also.  basically, how to gracefully shutdown an entire app?

thank you in advance, lucas

Dave S

unread,
May 14, 2019, 5:29:56 PM5/14/19
to web2py-users

I would use routes.py, or even put it directly in your front end if it is a static page.

(In my production case, nginx)


/dps
 

villas

unread,
May 16, 2019, 7:35:57 AM5/16/19
to web2py-users
Maybe you could also consider simply adding a redirect at the top of your first model file:
e.g.

redirect(URL('static','404.html'))
Reply all
Reply to author
Forward
0 new messages