title: Accessing variable context name in template
body: <p>I'm just discovering Django and i'm still a total noob.</p>
  
  <p>I got a view that return multiple query set.</p>
  
  <pre><code>class RouteDateView(ListView):
     model = Tblsummary
     template_name = 'reviewrouteassess/selectdaterange.html'
  
     def get_context_data(self, *args, **kwargs):
         context = super(RouteDateView, self).get_context_data(*args, **kwargs)
  
         context['allroute'] = Tblsummary.objects.filter(off_no=self.request.GET.get('depotcode')[:4])
  
         for p in context['allroute']:
            context[p.res_route] = Tblsummary.objects.filter(res_route=p.res_route)
  
         return context    
  </code></pre>
  
  <p>Then in my template I would like to access those dynamically name context. That's where i'm stuck. </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;table&gt;
  {% for a in allroute %}
      &lt;tr&gt;
          &lt;td&gt;{{ a.res_route }}&lt;/td&gt;
          &lt;td&gt;{{ a.hcalls }}&lt;/td&gt;
      &lt;/tr&gt;
      {% for d in a.res_route %}
          &lt;tr&gt;
              &lt;td&gt;{{ d.res_route }}&lt;/td&gt;
              &lt;td&gt;{{ d.hcalls }}&lt;/td&gt;
          &lt;/tr&gt;
      {% endfor %}
  {% endfor %}
  </code></pre>
  
  <p>How can I evaluate a.res_route so that a.res_route return the context passed by the view?? Thanks you so much!!</p>
  
  <blockquote>
    <p>{% for d in a.res_route %}</p>
  </blockquote>