title: Detect mobile, tablet or Desktop on Django
body: <p>I need to detect 3 types of device: <code>tablet</code>, <code>mobile</code> or <code>desktop</code>. </p>
  
  <p>I found a script for detecting mobile <a href="https://github.com/macgera/macgera/blob/master/middleware.py" rel="nofollow noreferrer">on github</a>, but how I can detect mobile, tablet and desktop?</p>