title: Django and how to check if object has children
body: <p>as a very much of a newbie in Django/python world I fail to find a way to check whether an object has children.</p>
  
  <p>An example:</p>
  
  <pre><code>Class MyItems
          title = models.CharField(max_length=50)
          parent = models.ForeignKey('self',null=True, blank=True,related_name='subitems')
  </code></pre>
  
  <p>Then in my template:</p>
  
  <pre><code>{% for item in MyItems %}
  &lt;li&gt; {{ item.title }} &lt;/li&gt;
      {% if item **IS A PARENT OF CHILDREN** %}
          &lt;p&gt;This is what I want&lt;/p&gt;
      {% endif %}
  {% endfor %}  
  </code></pre>
  
  <p>I can see if an item has a parent no problem, but how to do it other way around, tell if an item is a parent to other item?</p>
  
  <p>Thanks!</p>