Thank you Alessandro for the pointer.
Will try this out.
With Regards,
Dinesh.
On Wednesday, 24 May 2017 16:29:25 UTC-7, D R Dinesh Kumar wrote:
>
> Hi.
>
> We would like to manage ShutDown situation for our application where we
> would like to divert all calls to the app to default/shutdown.html page
> when 'ShutDown' is enabled in .ini file.
>
> For Ex:
> in development.ini file
> ------------------------------------
> app.shutdown = True
> app.shutdown_msg = 'system is in maintenance'
>
> if this is setup, then start the tg from ShutDownController() instead of
> RootController()
>
> where as in, my root.py has
> '--------------------------------------------
> class ShutDown(BaseController):
> expose(template="templates.shutdown")
> def default(self,*lst, **kw):
> msg = config.get('shutdown_msg','system is temporarity shutdown.
> Sorry for the inconvenience')
> return dict(msg = msg)
>
> class RootController(BaseController):
> ...
> ...
>
> This was handled during commands.py script in TG1 with Cherrypy.
>
> Is there any way to do the same in TG2? or is there any better way to
> handle this scenario?
>
> With Regards,
> Dinesh.
>
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.