title: Django's Double Underscore
body: <p>In Django, you can make database queries like the following:</p>
  
  <pre><code>Model.objects.filter(name__icontains = 'bob')
  </code></pre>
  
  <p>The question is:  how is this working 'under the cover'?  Is the double underscore a Django thing or a Python thing?  Is this just a single variable named <code>name__icontains</code>, or is it some sort of attribute-access syntax?  In the former case, how does the <code>filter</code> method parse the variable name to determine that you are searching the <code>Model</code> table for a name that <em>contains</em> somewhere the string <code>bob</code>?</p>