Nice work on that Angelo, I did have to change a few things, since 'dist' will not always exist (like when a non-Linux desktop machine visits). So this is what I did:
When any 'dist' or 'os' returns is_mobile=True, then the result will have is_mobile at the root. So you can test for mobile like this: ua = request.user_agent() if ua.is_mobile: ... else: ... This should simplify things a bit. I also modified the simple_detect() method (in case anyone uses it) to return a third item in the tuple which is either True or False for is_mobile. I have attached the new user_agent_parser.py file so that you can test and confirm it works for you. If so, let me know and I will submit this for inclusion into the trunk. Nice job!