I’m trying to do a validation on my server_cycle.py more specifically atdef on_session_created(session_context):**
I trying to validate a token and case this token is valid it shows the bokeh report (main.py) otherwise it should return an error or redirect to an error page. Is there a way to it with bokeh? Maybe something like:
There is nothing currently built in, although it seems like a fairly reasonable and useful feature, and perhaps not so hard to implement either, so I'd suggest making a GH feature request issue for it.
In the mean time the best suggestion I can offer is to have the lifecycle callback set some state on the session, and then have the app have a big top-level "if" statement that does something like only add a bit "error div" curdoc (instead of whatever it normally does) in case the validation failed.
I'm trying to do a validation on my server_cycle.py more specifically at def on_session_created(session_context):
I trying to validate a token and case this token is valid it shows the bokeh report (main.py) otherwise it should return an error or redirect to an error page. Is there a way to it with bokeh? Maybe something like:
Thanks for the suggestion Bryan! I’ve just posted the feature request on GH.
Best,
Ricardo
···
On Monday, February 13, 2017 at 10:43:48 AM UTC-5, Bryan Van de ven wrote:
Hi,
There is nothing currently built in, although it seems like a fairly reasonable and useful feature, and perhaps not so hard to implement either, so I’d suggest making a GH feature request issue for it.
In the mean time the best suggestion I can offer is to have the lifecycle callback set some state on the session, and then have the app have a big top-level “if” statement that does something like only add a bit “error div” curdoc (instead of whatever it normally does) in case the validation failed.
I’m trying to do a validation on my server_cycle.py more specifically at def on_session_created(session_context):
I trying to validate a token and case this token is valid it shows the bokeh report (main.py) otherwise it should return an error or redirect to an error page. Is there a way to it with bokeh? Maybe something like:
def on_session_created(session_context):
.
.
.
#tokenNotValid
else
session_context.destroy()
return Error
Thank you!
Ricardo
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].