title: Get data from the model class in Django
body: <p>I have a DetailView of a specific channel. All the data of the channel is listed here. There is a model class named 'ExecutionLog'. Currently, all others data are shown in the detail view except the data from the 'ExecutionLog' model class.</p>
  
  <p>The class is in 'Class-based views' which is totally new to me. I could not understand what is really going on.</p>
  
  <p>DetailView class view:</p>
  
  <pre><code>class ChannelDetailView(LoginRequiredMixin, SuperAdminMixin, ChannelView, DetailView):
      def get_context_data(self, *args, **kwargs):
          context = super(ChannelDetailView, self).get_context_data(*args, **kwargs)
  
          if 'date' in self.request.GET:
              d = self.request.GET['date']
              date = datetime.datetime.strptime(d, "%Y-%m-%d").date()
          else:
              date = datetime.date.today()
          context['activePage'] = {'tree': 'ChannelPage', 'branch': 'index'}
          datas = get_datas_hourly(True, self.object.id, date)
          matches_data = get_datas_hourly(False,self.object.id, date)
          context['date'] = date
          context['labels'] = datas.keys()
          context['values'] = datas.values()
          context['matches_labels'] = matches_data.keys()
          context['matches_values'] = matches_data.values()
          return context
  </code></pre>
  
  <p>model for ExecutionLog:</p>
  
  <pre><code>class ExecutionLog(models.Model):
      ACTION_TYPES = (
          (0, 'START'),
          (1, 'STOP'),
          (2, 'ASSIGNED'),
          (3, 'ERROR'),
          (4, 'OTHERS'),
      )
      type = models.IntegerField(default=0, choices=ACTION_TYPES)
      title = models.CharField(max_length=255)
      description = models.TextField(max_length=255, blank=True, null=True)
      date = models.DateTimeField(auto_now_add=True)
      execution = models.ForeignKey(Execution, related_name="execution_logs")
  
      class Meta:
          ordering = ['-date']
  </code></pre>
  
  <p>I want to get the ExecutionLog data of the specific channel the detailview page is of. </p>