How to properly use ListView and ContetMixin in Django : I am trying to use ListView and ContextMixin to create a view for this but I'm not sure if this is a right way to do it

    class ImplementView(generic.ListView):
    	template_name = 'schedule/implement.html'
    	context_object_name = 'all_implements'
    
    	def get_queryset(self):
    		return CourseImplementation.objects.all()
    
    	def get_context_data(self, **kwargs):
    		context = super(ImplementView, self).get_context_data(**kwargs)
    		context['teacherid'] = TeacherCourseImplementation.objects.all()
    		return context

This is my models.py

    class CourseImplementation(models.Model):
    	courseid = models.ForeignKey(Course, on_delete=models.CASCADE, db_column='courseid', )
    	roomid = models.ForeignKey('Room', models.DO_NOTHING, db_column='roomid', blank=True, null=True)
    	note = models.CharField(max_length=10, blank=True, null=True)
    
    	class Meta:
    		managed = False
    		db_table = 'course_implementation'
    
    	def __str__(self):
    		return self.pk + ' - ' + self.courseid
    
    class TeacherCourseImplementation(models.Model):
    	teacherid = models.ForeignKey(Teacher, on_delete=models.CASCADE, db_column='teacherid', primary_key=True)
    	course_impleid = models.ForeignKey(CourseImplementation, on_delete=models.CASCADE, db_column='course_impleid')
    	p1 = models.IntegerField(blank=True, null=True)
    	p2 = models.IntegerField(blank=True, null=True)
    	p3 = models.IntegerField(blank=True, null=True)
    	p4 = models.IntegerField(blank=True, null=True)
    	p5 = models.IntegerField(blank=True, null=True)
    
    	class Meta:
    		managed = False
    		db_table = 'teacher_course_implementation'
    		unique_together = (('teacherid', 'course_impleid'),)
    
    	def __str__(self):
    		return self.pk + ' - ' + self.teacherid

Can anyone help  me on this. Thank you.