title: Django: How To Pass Only Selected Arguments Through URL
body: <p>I am trying to create a search page where buttons can be clicked which will filter the posts like in this page [Splice Sounds][2] (i think you need an account to view this so ill add screenshots).</p>
  <p>To do this i think i need to pass a list so that i can filter by that list but i can't find a way to do this.</p>
  <p>having a <code>GET</code> form for each genre (which is being created by a for loop) would allow me to filter by one genre at a time but i want to filter by multple genres at once so that won't work</p>
  <p>in the site that i linked to: they pass the genres/tags into the url so how could i do this in django?</p>
  <p>Also: i could make seperate url paths and link to those but then i would have to do this for every combination of genres/tags which would be too much so i can't do that.</p>
  <p>the link shows a site which passes tags through url like this <a href="https://splice.com/sounds/search?sound_type=sample&amp;tag=drums,kicks" rel="nofollow noreferrer">https://splice.com/sounds/search?sound_type=sample&amp;tag=drums,kicks</a></p>
  <p>here is some relevant code:</p>
  <p>this is how i want to filter which is why i need to pass a list of args</p>
  <pre><code>for arg in args:
      Posts = Posts.filter(genres=arg)
  </code></pre>
  <p>urls</p>
  <pre><code>urlpatterns = [
      path('', views.find, name='find'),
      path('searchgenres=&lt;genres_selected&gt;', views.find_search, name='find_search'),
  ]
  </code></pre>
  <p>EDIT: I have tried this many ways such as using ajax but i couldn't get that to work well</p>
  <p>EDIT 2: i have changed the question to How To Pass Only Selected Arguments Through URL</p>