title: Multiple URL key-value pair parameters that are optional in Django
body: <p>I'm looking for a way to have multiple optional URL parameters (key-value pairs) in a Django project.</p>
  
  <p>Ideally I need something capable of processing an infinite number of key-value pairs. In the format shown below.</p>
  
  <p><code>http://example.com/example/key1/value1/</code></p>
  
  <p><code>http://example.com/example/key1/value1/key2/value2/</code></p>
  
  <p><code>http://example.com/example/key1/value1/key2/value2/key3/value3/</code></p>
  
  <p>The use case for this sort of URL structure is for different filters that may or may not be applied to a list of objects, traditionally I would use query strings, but I'm under the impression that query strings are not as good for SEO.</p>
  
  <p>I'm not too sure of two things:</p>
  
  <ol>
  <li>How to write the URL rule</li>
  <li>How to interpret the key-value parameters in the view</li>
  </ol>
  
  <p>Any help/pointers would be much appreciated!</p>