I think something like....

#in controller or model

if request.env.http_user_agent=='...':
    response.layout='layout1.html'
else:
    response.layout='layout2.html'

and in views

{{extend response.layout}}

Mind that if you do this will not be able to bytecode apps.

On Dec 27, 11:50 am, yosvel <[email protected]> wrote:
> So nice to write to you web2py-users
>
> I am a experienced PHP web developer with frameworks like Symfony and
> CodeIgniter..
> Now, 3 days reading documentation and I am really impressed on how fun
> is web development with Python and the Web2Py framework
>
> but, I have some questions to ask you:
> 1. how can I drive my views in acording to the user's agent: browser
> or mobils
> 2. how can I optimize + combine + minify + gzip (or any compression in
> python) my files CSS, JS, and Images
>
> thank you so much,
> yosvel

Reply via email to