I don't think you can control that using the @mobilize decorator, but 
instead of using the decorator, you can use request.user_agent().is_mobile 
to detect mobile clients and make changes accordingly. The @mobilize 
decorator just does this:

        user_agent = request.user_agent()
        if user_agent.is_mobile:
            items = response.view.split('.')
            items.insert(-1,'mobile')
            response.view = '.'.join(items)

You could add that logic yourself to a model file, but make it conditional 
so it isn't executed if the user has selected the desktop version (that 
choice can be stored in the session).

Anthony

On Saturday, August 25, 2012 8:04:57 PM UTC-4, Mark Li wrote:
>
> I would like to add the option to visit the regular version of the site on 
> the mobile-view.
>
> However, from my understanding of @mobilize, it automatically redirects to 
> the mobile version of the page if a mobile device is detected. Is there a 
> way to override this behavior if a visitor on a mobile-device chooses the 
> Non-mobile option for the site?
>

-- 



Reply via email to