title: Get parent by its children in Django Queryset
body: <p>I have this model:</p>
  <pre><code>Department(models.Model):
      title =  models.CharField(max_length=128)
      reference = models.ForeignKey('self', related_name='reference')
  </code></pre>
  <p>As you see, each object of this model can have parent and conversely.</p>
  <p>For example, these are department's objects:</p>
  <pre><code>id = 1 , title = 'dep 1' , reference_id = Null
  id = 2 , title = 'dep 2' , reference_id = 1
  id = 3 , title = 'dep 3' , reference_id = Null
  id = 4 , title = 'dep 4' , reference_id = 1
  id = 5 , title = 'dep 5' , reference_id = 3
  id = 6 , tiltl = 'dep 6' , reference_id = 3
  id = 7 , title = 'dep 7' , reference_id = 3
  id = 8 , title = 'dep 8' , reference_id = 9
  id = 9 , title = 'dep 9' , reference_id = Null
  id = 10, title = 'dep 10', reference_id = 9
  </code></pre>
  <p>Now I want to get list of objects that has this condition: <code>Each parent by its children</code>. like this:</p>
  <pre><code>- dep 1 
      dep 2 
      dep 4 
  - dep 3 
      dep 5
      dep 6
      dep 7
  - dep 9
      dep 8 
      dep 10
  </code></pre>
  <p>How can I do that? (Can I create this list just with <code>Django ORM</code>?)</p>
  <p><strong>Update</strong>
  This is my department levels:</p>
  <pre><code>Department_Level = (
      (1, 'headquarters'),
      (2, 'unit'),
      (3, 'center'),
  )
  level = models.IntegerField(choices=Department_Level,default=.Department_Level[2][0])    
  </code></pre>
  <p><strong>And I want just level 2 and 3 in my list.</strong></p>