title: How to define the slug of another model in myListView
body: <p>I sort of need help understanding my own code specifically the views.py. I'm trying to change url pattern for my TitleUpdateListView from using my Update models title field and instead using the slug field instead.  </p>
  
  <p>If someone could help explain line by line whats going in in my TitleUpdateListView so I could better understand whats specifically going on that would be great. </p>
  
  <p>urls.py</p>
  
  <pre><code>urlpatterns = [
      # Update view for each game
      path('&lt;str:title&gt;/updates/', TitleUpdateListView.as_view(), name='title-updates'),
      # Adds the ability to sort by platform
      path('&lt;str:title&gt;/updates/&lt;int:platform_id&gt;/', TitleUpdateAjaxListView.as_view(), name='title-updates-ajax'),
  
  ]
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>class TitleUpdateListView(ListView):
      model = Update
      context_object_name = 'updates'
      template_name = 'updates/title_updates.html'
  
      def get_queryset(self):
          title = get_object_or_404(Game, title=self.kwargs.get('title'))
          return Update.objects.filter(game=title).order_by('-date_published')
  
      def get_context_data(self, **kwargs):
          context = super(TitleUpdateListView, self).get_context_data(**kwargs)
          context['game'] = get_object_or_404(Game, title=self.kwargs.get('title'))
          return context
  
  
  class TitleUpdateAjaxListView(ListView):
      model = Update
      template_name = 'updates/updates_ajax.html'
      context_object_name = 'updates'
      paginate_by = 5
  
      def get_queryset(self):
          title = get_object_or_404(Game, title=self.kwargs.get('title'))
          return Update.objects.filter(game=title, platform=Platform.objects.filter(
              id=self.kwargs.get('platform_id')).first()).order_by('-date_published')
  
      def get_context_data(self, **kwargs):
          context = super(TitleUpdateAjaxListView, self).get_context_data(**kwargs)
          context['game'] = get_object_or_404(Game, title=self.kwargs.get('title'))
  
          return context
  
      def get(self, request, *args, **kwargs):
          self.object_list = self.get_queryset()
          context = self.get_context_data()
          return render(request, self.template_name, context)
  </code></pre>