title: Django: Filter objects by integer between two values
body: <p>I'm struggling with a Django filtering problem I couldn't solve so far. I have a database with from/to integers, and I need a Django Filter that returns any objects where a given integer is within that range.</p>
  
  <p>I have the following model (simplified):</p>
  
  <pre><code>class Dataset(models.Model):
      i_begin_int = models.BigIntegerField()
      i_end_int = models.BigIntegerField()
  </code></pre>
  
  <p>So for example, I have the following data:</p>
  
  <pre><code>+----+-------------+-----------+
  | id | i_begin_int | i_end_int |
  +----+-------------+-----------+
  |  1 |         100 |       200 |
  +----+-------------+-----------+
  |  2 |         150 |       300 |
  +----+-------------+-----------+
  |  3 |        7000 |      7500 |
  +----+-------------+-----------+
  </code></pre>
  
  <p>So now I have an integer, lets say, 170. I need all objects where 170 is between <code>i_begin_int</code> and <code>i_end_int</code>. In the example table, that would be objects with id 1 and 2.</p>
  
  <p>Is there a Django filter that I could use for this?</p>