On Sunday, May 19, 2019 at 8:16:54 PM UTC-7, Alex Glaros wrote:
>
> how would I redirect to a plain static web page that displays "This Web2py 
> app is temporarily down while we install updates"? Could I redirect to 
> another site? Is there code to sense when site is broken then automatically 
> redirects users?
>
> I use pythonanywhere.com, redirect through a SSL service and my routes.py 
> looks like:
>
> #!/usr/bin/python
> # -*- codingf-8 -*-
> routers = dict(
>     # base router
>     BASE=dict(
>         default_application='myDomain',
>         domains={'www.myDomain':'myDomain'}
>     ),
> )
>
>
> thanks,
>
> Alex Glaros
>


What's your front-end?  With nginx, I think I'd set it to server the 404 or 
Under Construction page from a static file.  You can also tweak your 
routes.py to do a similar thing, but the front end will be faster.

The Disable button on /admin/sites didn't seem to do anything on my home 
setup, W10 with 2.14.6 (yes, I know) and Rocket.  So I'm not sure what 
automatic provisions for site maintenance are supposed to be there.

/dps



-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/b8191281-10d8-4eda-a0c6-5794e8996039%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to