title: How to get the nearest location entries from a database?
body: <p>I store coordinates as latitude longitude pairs in my database. Now, I need to retrieve all the entries that are within a given radius from a given lat-long coordinate. For example, if given coordinates 48.796777, 2.371140 and distance of 20 kilometers, it would retrieve all the records within 20 kilometers from that point.</p>
  
  <p>If it provides any simplification or results in less CPU time, it's accurate enough to calculate the "straight" distance between the points, i.e. there's no need to factor in the curvature of the earth.</p>
  
  <p>How can this be achieved with Django? More specifically, how should the view (and possibly the model) be constructed for such a query?</p>