fixed request.user_agent().get('is_mobile', False), thanks Jonathan