title: Python/Bottle/MongoDB: Unsupported response type: <type 'dict'>
body: <pre><code>@route('/locations', method='GET')
  def get_location():
      entity = db['locations'].find({'coordinate2d': {'$near': [37.871593, -122.272747]}}).limit(3)
      if not entity:
          abort(404, 'No nearby locations')
      return entity
  </code></pre>
  
  <p>The response for the above portion of code is:</p>
  
  <pre><code>Error 500: Internal Server Error
  
  Sorry, the requested URL 'http://localhost:8080/locations' caused an error:
  
  Unsupported response type: &lt;type 'dict'&gt;
  </code></pre>
  
  <p>How can I grab that information from mongo as a type Bottle can return as JSON?</p>