On Nov 7, 2017, at 13:42, Patrick Wright <patrickjwright@gmail.com> wrote:
Bryan,
Thanks much for your reply.
I found a solution using some javascript which parses the user agent string. Including the .js file and some simple logic at the top of my index.html file, users are redirected accordingly to the desktop or the mobile site.
If any other Bokeh users run into a similar issue, I'd be happy to share this.
Thanks,
--Patrick
On Monday, November 6, 2017 at 1:03:57 PM UTC-7, Bryan Van de ven wrote:
Also that app is really cool, thanks for sharing!
Bryan
> On Nov 6, 2017, at 14:03, Bryan Van de ven <bry...@anaconda.com> wrote:
>
> Hi,
>
> There is an open issue and discussion about ways to extend this:
>
> How to keep state in bokeh server across more than one worker · Issue #7091 · bokeh/bokeh · GitHub
>
> Basically my proposal is to add a "hook" that would let users do whatever they want (i.e. save to a file or database) to store things like additional request information that could be loaded later by a session. Given the unavoidable problems with non-sticky sessions and load balancers, etc., I think providing hooks for *users* to define their own policies appropriate to their specific situation is the best we can do.
>
> Please chime in their if you have thoughts or would be interested in helping to contribute this feature, with some guidance.
>
> In the mean time I don't have an great suggestions. The Bokeh server is a collection of tornado views so it would be possible to extend the current views with something like this and assembled them in to a "custom" bokeh server but that's a somewhat advanced proposition.
>
> Thanks,
>
> Bryan
>
>> On Nov 6, 2017, at 13:36, Patrick Wright <patrick...@gmail.com> wrote:
>>
>> I have developed a Bokeh app, hosted on Heroku. The app is viewable here:
>> https://btac-web-plots.herokuapp.com/avyview?style=snowpacktracker
>>
>> The plots can really only be viewed on a desktop screen, and do not render well on a mobile device.
>> I am currently developing a much simpler style of the plots for mobile view, which will look something like this (still under development):
>> https://btac-web-plots.herokuapp.com/avyview?style=snowpacktracker-mobile
>>
>> I am currently controlling the style of the plots using the arguments available with `args = curdoc().session_context.request.arguments`.
>>
>> However, it would be great to access the user agent string, detect whether or not the user is on a mobile device, and then define my style parameters accordingly.
>>
>> The docs for Accessing the HTTP Request make it look like this is not possible.
>> Has this changed, or is there any way to implement this??
>>
>> Any advice on how to best access the user agent string would be much appreciated.
>> --Patrick
>>
>>
>>
>>
>> --
>> 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 bokeh+un...@continuum.io.
>> To post to this group, send email to bo...@continuum.io.
>> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/926ebbfd-0742-43a4-bd75-19889b85b4f6%40continuum.io\.
>> For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
>
--
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 bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/4f27b507-60fb-4976-8696-533d6078e29e%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.