title: How to define optional query parameters in Django?
body: <p>here i got one endpoint to receive multiple query parameters namely <code>first_name</code>, <code>last_name</code>. <code>location</code> and i need the endpoint to be able to handle following scenarios</p>
  <ul>
  <li>all the 3 param's</li>
  <li>1 param</li>
  <li>2 param's</li>
  </ul>
  <p>And i found <a href="https://stackoverflow.com/a/24610817/10516773">this</a> but still i got <code>404</code> when provide one query parameter, only works when all the parameters are given.</p>
  <p><code>urls.py</code></p>
  <pre><code>re_path(r'^project_config/(?P&lt;product&gt;\w+|)/(?P&lt;project_id&gt;\w+|)/(?P&lt;project_name&gt;\w+|)/$',
              views.results, name='config')
  </code></pre>
  <p>And view</p>
  <pre><code>    def results(request, product, project_id, project_name):
          response = &quot;You're looking at the results of question %s.&quot;
          print(product)
          print(project_name)
          return HttpResponse(response % project_id)
  </code></pre>
  <p>How can allow url to accept optional query parameters ?</p>