title: Only pass arguments that aren't None to Flask's url_for
body: <p>I am currently trying to set up a search in Flask using keywords and the form GET method.</p>
  
  <p>To handle pagination, I have to pass all the keywords for the filters to the <code>url_for</code> for the next or last pages. However, sometimes these keywords aren't needed and just clutter up the url bar.</p>
  
  <pre class="lang-py prettyprint-override"><code>{{ url_for(request.endpoint, page=pagination.next_num, searchTerm=searchTerm, blendLicense=blendLicense, renderEngine=renderEngine, blenderVersion=blenderVersion) }}
  </code></pre>
  
  <p>Is there a way to only pass the keywords that aren't <code>None</code> so as not to clutter up the URL bar? If it were only one keyword to check, I'd use an <code>if else</code> block, but there are many keywords to check.</p>