Thanks a lot, Anthony! I was not aware of
request.global_settings.cmd_options, and yes it works in differentiating
between the http request and shell.
I've posted up a ticket for this as well:
https://code.google.com/p/web2py/issues/detail?id=1957
On Saturday, July 26, 2014 8:27:48 PM UTC-7,
Try:
cmd_opts = request.global_settings.cmd_options
if request.function=="index" and not (cmd_opts and (cmd_opts.shell or
cmd_opts.scheduler)):
redirect(URL('splash'))
We should probably provide a more convenient method to check whether we
have an http request vs. a shell or scheduler run (
2 matches
Mail list logo