LOAD(..., vars=dict(is_mobile=request.user_agent().is_mobile))is_mobile = (request.vars.is_mobile == 'True')...
{{ =LOAD('service', 'serv1') }}
...response.view = "service.load" 
def serv1():  
    return dict(){{ is_mobile = request.user_agent().is_mobile }}
...
File "/Users/atomos/Desktop/W2P/web2py-master/gluon/restricted.py", line 220, in restricted
exec ccode in environment
File "/Users/atomos/Desktop/W2P/web2py-master/applications/mbpd/views/service.load", line 1, in <module>
{{ is_mobile = request.user_agent().is_mobile }}
TypeError: 'NoneType' object is not callable
{{=LOAD('service', 'serv1', ajax=True)}}
Sure. It's fairly simple tho since the Exception gets raised on line 1 of my LOADed view.Views/default/search.html:
{{ =LOAD('service', 'serv1') }}
...Controllers/service.py:
def serv1():
return dict()Views/service.load :
...Ticket :
File "/Users/atomos/Desktop/W2P/web2py-master/gluon/restricted.py", line 220, in restricted
exec ccode in environment
File "/Users/atomos/Desktop/W2P/web2py-master/applications/mbpd/views/service.load", line 1, in <module>
{{ is_mobile = request.user_agent().is_mobile }}
TypeError: 'NoneType' object is not callable
On Wednesday, July 16, 2014 10:48:23 PM UTC+2, Anthony wrote: