[web2py] Re: request.user_agent().is_mobile

2013-11-28 Thread szimszon
I had that with 2.7.x too. I changed all my app to 
user_agent()['is_mobile'] :-o

2013. november 28., csütörtök 20:55:14 UTC+1 időpontban mr.freeze a 
következőt írta:
>
> Did request.user_agent() change from a Storage object to dict? 
> request.user_agent().is_mobile is throwing errors for me on the latest bits 
> (2.8.2):
> AttributeError: 'dict' object has no attribute 'is_mobile'. 
> Happy Thanksgiving!
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: request.user_agent().is_mobile

2014-03-16 Thread vince
clean doesn't work for me too on 2.9.5, only 
request.user_agent()['is_mobile'] works.

On Friday, November 29, 2013 11:46:56 AM UTC+8, Tim Richardson wrote:
>
> To fix this, you need to clear sessions.
> The easiest way to do this is via the admin app.
> Find the application causing problems, and from the menu of actions per 
> application, choose "Clean"
>
> This will fix the problem.
> At least, it fixes the "is_mobile" problem that people are experiencing 
> due to the new web2py version. 
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: request.user_agent().is_mobile

2013-11-28 Thread Massimiliano
Have you tried to delete sessions?


On Thu, Nov 28, 2013 at 9:32 PM, szimszon  wrote:

> I had that with 2.7.x too. I changed all my app to
> user_agent()['is_mobile'] :-o
>
> 2013. november 28., csütörtök 20:55:14 UTC+1 időpontban mr.freeze a
> következőt írta:
>
>> Did request.user_agent() change from a Storage object to dict?
>> request.user_agent().is_mobile is throwing errors for me on the latest bits
>> (2.8.2):
>> AttributeError: 'dict' object has no attribute 'is_mobile'.
>> Happy Thanksgiving!
>>
>  --
> 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 web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Massimiliano

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: request.user_agent().is_mobile

2013-11-28 Thread mr.freeze
Yes, same error unfortunately and request.user_agent() still returns a 
dict. I could swear it used to return a Storage object.

On Thursday, November 28, 2013 3:26:10 PM UTC-6, Massimiliano wrote:
>
> Have you tried to delete sessions?
>
>
> On Thu, Nov 28, 2013 at 9:32 PM, szimszon 
> > wrote:
>
>> I had that with 2.7.x too. I changed all my app to 
>> user_agent()['is_mobile'] :-o
>>
>> 2013. november 28., csütörtök 20:55:14 UTC+1 időpontban mr.freeze a 
>> következőt írta:
>>
>>> Did request.user_agent() change from a Storage object to dict? 
>>> request.user_agent().is_mobile is throwing errors for me on the latest bits 
>>> (2.8.2):
>>> AttributeError: 'dict' object has no attribute 'is_mobile'. 
>>> Happy Thanksgiving!
>>>
>>  -- 
>> 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 web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Massimiliano 
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: request.user_agent().is_mobile

2013-11-28 Thread Tim Richardson
To fix this, you need to clear sessions.
The easiest way to do this is via the admin app.
Find the application causing problems, and from the menu of actions per 
application, choose "Clean"

This will fix the problem.



On Friday, 29 November 2013 08:52:29 UTC+11, mr.freeze wrote:
>
> Yes, same error unfortunately and request.user_agent() still returns a 
> dict. I could swear it used to return a Storage object.
>
> On Thursday, November 28, 2013 3:26:10 PM UTC-6, Massimiliano wrote:
>>
>> Have you tried to delete sessions?
>>
>>
>> On Thu, Nov 28, 2013 at 9:32 PM, szimszon  wrote:
>>
>>> I had that with 2.7.x too. I changed all my app to 
>>> user_agent()['is_mobile'] :-o
>>>
>>> 2013. november 28., csütörtök 20:55:14 UTC+1 időpontban mr.freeze a 
>>> következőt írta:
>>>
 Did request.user_agent() change from a Storage object to dict? 
 request.user_agent().is_mobile is throwing errors for me on the latest 
 bits 
 (2.8.2):
 AttributeError: 'dict' object has no attribute 'is_mobile'. 
 Happy Thanksgiving!

>>>  -- 
>>> 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 web2py+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
>>
>> -- 
>> Massimiliano 
>>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: request.user_agent().is_mobile

2013-11-29 Thread mr.freeze
That didn't work for me.  It's easy enough to change 
request.user_agent().is_mobile to request.user_agent()['is_mobile'].  Just 
curious as to why it changed.

On Thursday, November 28, 2013 9:46:56 PM UTC-6, Tim Richardson wrote:
>
> To fix this, you need to clear sessions.
> The easiest way to do this is via the admin app.
> Find the application causing problems, and from the menu of actions per 
> application, choose "Clean"
>
> This will fix the problem.
> At least, it fixes the "is_mobile" problem that people are experiencing 
> due to the new web2py version. 
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: request.user_agent().is_mobile

2013-11-29 Thread Massimo Di Pierro
It is not the syntax at web2py level that changed. Only the format in the 
session files. Before it was storing user_agent as a dict and converting it 
to a Storage of Storages upload loading. This was extra work at each 
request. Now we are storing the user_agent info as a Storage or Storages, 
as needed.

On Friday, 29 November 2013 11:21:19 UTC-6, mr.freeze wrote:
>
> That didn't work for me.  It's easy enough to change 
> request.user_agent().is_mobile to request.user_agent()['is_mobile'].  Just 
> curious as to why it changed.
>
> On Thursday, November 28, 2013 9:46:56 PM UTC-6, Tim Richardson wrote:
>>
>> To fix this, you need to clear sessions.
>> The easiest way to do this is via the admin app.
>> Find the application causing problems, and from the menu of actions per 
>> application, choose "Clean"
>>
>> This will fix the problem.
>> At least, it fixes the "is_mobile" problem that people are experiencing 
>> due to the new web2py version. 
>>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.