Re: [web2py] proper way to mobile and desktop 'skins'

2012-11-10 Thread Ray (a.k.a. Iceberg)
Hi there, I just come across this old post. I solve this problem in a slightly different way. With all the same *.mobile views ready, I just explicitly use ".mobile" extension name as my visiting url, such as http://.../app/controller/action.mobile, therefore I don't need those "if is_mobile"

Re: [web2py] proper way to mobile and desktop 'skins'

2011-06-28 Thread Daniel Gonzalez
Sorry, i sent the message incomplete: Hi! I'm using jQueryMobile to make the "mobile skin", and the way that i do is this: if is_mobile and request.extension == "html" : #Its mobile response.view = "%s/%s.%s" % (request.controller, request.function, "mobile")

Re: [web2py] proper way to mobile and desktop 'skins'

2011-06-28 Thread Daniel Gonzalez
Hi! I'm using jQueryMobile to make the "mobile skin", and the way that i do is this: if is_mobile and request.extension == "html" : #Its mobile response.view = "%s/%s.%s" % (request.controller, request.function, "mobile") if not os.path.exists(os.path.join(req

[web2py] proper way to mobile and desktop 'skins'

2011-06-27 Thread Luis Goncalves
Hello! I need to customize my views so that they look good on a computer screen and on a smart phone. One way to do so, It think, is to have separate layout definitions and then do something like: {{if session.platform == 'mobile':}} {{extend 'mobile-layout.html}} {{else:}} {{extend 'desktop-l