I need to detect 3 types of device: tablet, mobile or desktop.
tablet
mobile
desktop
I found a script for detecting mobile on github, but how I can det
Have a look at MobileESP. It has been recently ported to Python for Django web app framework. It can detect various classes and tiers of devices (including smatphones, tablets).