title: writing a django query and get reverse related objects in one hit of database!
body: <p>i have written these models in models.py:</p>
  
  <pre>
  class User(models.Model):
      first_name = models.CharField(max_length=80)
  
  class Skill(models.Model):
      user = models.ForeignKey(User)
      title = models.CharField(max_length=80)
      level = models.IntegerField(default=3)
  
  class Work(models.Model):
      user = models.Foriegnkey(User)
      work_name = models.CharField(max_length=80)
      salary = models.IntegerField()
  </pre>
  
  <p>now i want to get those Works from database which their users have a certain skill, and render a html with them. i write this code in views.py:</p>
  
  <pre>
  def show_works(request, skill):
      works = Work.objects.select_related().filter(user__skill__title=skill)
      return render_to_response("works.html", {'works':works})
  </pre>
  
  <p>but there is another thing i want to show in that html: i want to show first_name of the user of that work and his skills. i used select_related(), but i can only show first_name but i can't reach user's skills.</p>
  
  <p>i want to write an optimal query to get the works and the other extra informations, like user and the skills of it user! like the code blow:
  ( i don't want to hit database for every work to get its user's skills )</p>
  
  <p>template works.html:</p>
  
  <pre>
  {% for work in works %}
      
          {{work.work_name}}
          user is : {{work.user.first_name}}
          which has these skills:
          {% for skill in work.user.skill %}
               {{skill.title}} 
          {% endfor %}
      
  {% endfor %}
  </pre>