title: How to show all the lesson urls present in a lesson list?
body: <p>I would like to retrieve lesson present in chapter model.</p>
  <pre><code>class Course(models.Model):
      category = models.ForeignKey(Category, on_delete=models.CASCADE)
      title = models.CharField(max_length=200)
      description = models.TextField()
      price = models.FloatField()
  
  class Chapter(models.Model):
      title = models.CharField( max_length=200)
      course = models.ForeignKey(Course, on_delete=models.CASCADE)
      is_active = models.BooleanField(default=True)
  
  class Lesson(models.Model):
      chapter = models.ForeignKey(Chapter, on_delete=models.CASCADE)
      title = models.CharField(max_length=200)
      video_url = models.URLField()
  </code></pre>
  <p>Below is my views.py:</p>
  <pre><code>def courseDetail(request, category_slug, course_slug):
      try:
          course_detail = Course.objects.get(category__slug=category_slug, slug=course_slug)
          all_chapters = Chapter.objects.filter(course=course_detail).order_by('created_date')
          all_lessons = Lesson.objects.filter(chapter__id__in=all_chapters)
      except Exception as e:
          raise e
  
      context = {
          'course_detail': course_detail,
          'all_chapters': all_chapters,
          'all_lessons': all_lessons,
      }
      return render(request, 'course-detail.html', context)
  </code></pre>
  <p>Here is my urls.py:</p>
  <pre><code>urlpatterns = [
      path('&lt;slug:category_slug&gt;/&lt;slug:course_slug&gt;/', views.courseDetail, name='course-detail'),
  ]
  </code></pre>
  <p>I am trying to explain my issue with the bellow example
  Ex:</p>
  <ol>
  <li><strong>Course:</strong> &quot;Course 1&quot;</li>
  <li>In that course i have 2 chapters i.e Chapter 1, Chapter 2</li>
  <li>And each chapter contains 3 lessons. i.e Chapter 1 contains Lesson 1, Lesson 2, Lesson 3 and Chapter 2 contains Lesson 4, Lesson 5, Lesson 6.</li>
  </ol>
  <p>So when I wanted to show respective lessons inside the respective chapters it's showing all the lessons in both the chapters. How to fix this?</p>