title: How to retrieve data from one to many relations in django?
body: <p>I am making my personal website using django 1.10</p>
  
  <p>Here is models of skill app:</p>
  
  <pre><code>from __future__ import unicode_literals
  
  from django.db import models
  
  
  # Create your models here.
  class Skill(models.Model):
      name = models.CharField(max_length=256)
      created_at = models.DateTimeField(auto_now=False, auto_now_add=True)
      updated_at = models.DateTimeField(auto_now=True, auto_now_add=False)
  
      def __unicode__(self):
          return self.name
  
      def __str__(self):
          return  self.name
  
  
  class Subskill(models.Model):
      skill = models.ForeignKey(Skill, on_delete=models.CASCADE)
      name = models.CharField(max_length=256)
      link = models.CharField(max_length=256)
      created_at = models.DateTimeField(auto_now=False, auto_now_add=True)
      updated_at = models.DateTimeField(auto_now=True, auto_now_add=False)
  
      def __unicode__(self):
          return self.name
  
      def __str__(self):
          return self.name
  </code></pre>
  
  <p>And view:</p>
  
  <pre><code>from django.shortcuts import render
  from skill.models import Skill,Subskill
  
  
  # Create your views here.
  def home(request):        
      skill = Skill.objects.all()
      subskill =Subskill.objects.all()    
      context = {'skills':skill,
                 'subskills':subskill}
      return render(request, 'skill.html', context)
  </code></pre>
  
  <p>This is my template page:</p>
  
  <h1>skill.html</h1>
  
  <pre><code>{% block skill %}
  {% for subskill in subskills %}
  {{subskill.skill.name}}
  {{subskill.name}}
  {% endfor %}
  {% endblock skill %}
  </code></pre>
  
  <p>Let assume, there is a skill named web design which has two subskill named html and css.
  I want to render in view page as like as skill name and it's two child name:</p>
  
  <p><strong>Web design</strong></p>
  
  <p>Html</p>
  
  <p>CSS</p>
  
  <p>But it renders as like Web design Html Web design CSS</p>
  
  <p>Please help me about this issue.</p>