title: Ajax request returns `Page not found (404)` result
body: <p>I know what that error means. I need your help to see my code, what I am doing wrong.</p>
  <p>I want to create an <code>add to wishlist</code> button, here is the tag:</p>
  <pre><code>&lt;a href=&quot;{% url 'listing:wishlist' %}&quot; id=&quot;wishlistbtn&quot; data-slug='{{ list.slug }}'&gt;Add to wishlist&lt;/a&gt;
  </code></pre>
  <p>urls.py</p>
  <pre><code>path('wishlist/', wishlist, name='wishlist'),
  </code></pre>
  <p>Ajax code in template:</p>
  <pre><code>$(document).on('click', '#wishlistbtn', function (e) {
      let el = $(this);
  
      $.ajax({
          type: 'GET',
          url: &quot;/wishlist/&quot;,
          data: {
              title_slug: el.attr(&quot;data-slug&quot;),
          },
  
          success: function () {
              alert('added to wishlist');
          }
  
      })
  })
  </code></pre>
  <p>and here is the view:</p>
  <pre><code>def wishlist(request):
      slug = request.GET.get('title_slug')
      obj = get_object_or_404(Listing, slug=slug)
      profile = Profile.objects.all().filter(user=request.user).first()
      profile.wishlist.add(obj)
      
      return HttpResponse('true')
  </code></pre>
  <p>Kindly help me find the error and solve it.</p>