title: Two slugs in url
body: <p>I want to have a url pattern that takes 2 slugs. I'm trying to make it look like <code>http://127.0.0.1:8000/category/model</code> but I'm having difficulties understanding how to do this.</p>
  
  <p>Below is what I have so far:</p>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>def model_detail_view(request, category_slug, model_slug):
          model = Model.objects.get(
          category__slug=category_slug, model_slug=model_slug)
      context = {
          "model": model,
      }
      return render(request=request, template_name='main/model_detail.html', context=context)
  </code></pre>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>path("&lt;str:category_slug&gt;/&lt;str:model_slug&gt;/", views.model_detail_view, name="model_detail_view"),
  </code></pre>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>class Category(models.Model):
      title = models.CharField(max_length=50)
      featured_image = models.ImageField(upload_to="categories")
      category_slug = AutoSlugField(null=True, default=None,
                           unique=True, populate_from='title')
  
      class Meta:
          verbose_name_plural = "Categories"
  
      def __str__(self):
          return self.title
  
  class Model(models.Model): 
      title = models.CharField(max_length=80)
      category = models.ManyToManyField(Category)
      featured_image = models.ImageField(upload_to=image_dir)
      model_slug = AutoSlugField(null=True, default=None,
                           unique=True, populate_from='title')
  
      class Meta:
          verbose_name_plural = "Models"
  
      def __str__(self):
          return self.title
  </code></pre>