title: If / else in Django View
body: <p>I'm trying to display a different template depending on a condition:</p>
  
  <pre><code>class RouteList(ListView):
      model = DailyRoute
      template_name = 'route_list.html'
  
      def get_queryset(self):
          if DailyRoute.objects.filter( stage = '1').exists():
              query_set = DailyRoute.objects.filter(owner=employer, stage = '1').order_by('route')
  
          else:
              query_set = []
  
          return query_set
  </code></pre>
  
  <p>If True - go to template 1.html
  If False - go to template 2.html</p>
  
  <p>The above works for template 1.html only. I can't figure out how properly use the if/else statements to return the correct template and query_set for True/False. Feeling like a dope on this one. </p>