referencing the pk/id/slug in DetailView

class Player(models.Model):
  name = models.CharField(max_length=30)

class Toon(models.Model):
  name = models.CharField(max_length=30)
  player = models.ForeignKey(Player, on_delete=models.CASCADE)

I’m trying to create a detail view for players which lists the toons associated with the player. Like this:

class PlayerDetailView(DetailView):
  model = Player
  def get_context_data(self, **kwargs):
    context = super().get_context_data(**kwargs)
    context['toons'] = Toon.objects.filter(
    return context

How do I reference the pk field passed to the view, or am I thinking about this in the wrong way?

Thanks in advance

All named url parameters are made available in a CBV through the self.kwargs object. See the docs and examples at Built-in class-based generic views | Django documentation | Django

Thank you very much.