title: pass kwargs for the view in reverse; django 1.5
body: <p>Being a django starter, I have a little problem to deal with:</p>
  
  <h1>html code:</h1>
  
  <pre><code>&lt;li&gt;&lt;a href="{% url 'dyn_display' category='first'%}"&gt;first&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="{% url 'dyn_display' category='second'%}"&gt;second&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="{% url 'dyn_display' category='third'%}"&gt;third&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <h1>urlconf.py</h1>
  
  <pre><code>url(r'(?P&lt;category&gt;[a-z]+)$', 'display', name='dyn_display')
  </code></pre>
  
  <h1>view.py</h1>
  
  <pre><code>def courses_display(request, category):
      return render_to_response('display/basic.html', {category: 'in'}, context_instance=RequestContext(request))
  </code></pre>
  
  <p>and finally a part of basic.html, so you can get a thought of why i need that category variable</p>
  
  <h1>basic.html</h1>
  
  <pre><code>&lt;div class="accordion" id="accordion2"&gt;
      &lt;div class="accordion-group"&gt;
          &lt;div class="accordion-heading"&gt;
              &lt;a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseFirst"&gt;
                  &lt;strong&gt;First&lt;/strong&gt;
              &lt;/a&gt;
          &lt;/div&gt;
          &lt;div id="collapseFirst" class="accordion-body collapse {{ first }}"&gt;
               &lt;div class="accordion-inner"&gt;
                   ...
               &lt;/div&gt;
           &lt;/div&gt;
       &lt;/div&gt;
       &lt;div class="accordion-group"&gt;
           &lt;div class="accordion-heading"&gt;
               &lt;a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseSecond"&gt;
                   &lt;strong&gt;Second&lt;/strong&gt;
               &lt;/a&gt;
           &lt;/div&gt;
           &lt;div id="collapseSecond" class="accordion-body collapse {{ second }}"&gt;
               &lt;div class="accordion-inner"&gt;
                   ...
               &lt;/div&gt;
           &lt;/div&gt;
       &lt;/div&gt;
       &lt;div class="accordion-group"&gt;
           &lt;div class="accordion-heading"&gt;
               &lt;a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseThird"&gt;
                   &lt;strong&gt;Third&lt;/strong&gt;
               &lt;/a&gt;
           &lt;/div&gt;
           &lt;div id="collapseThird" class="accordion-body collapse {{ third }}"&gt;
               &lt;div class="accordion-inner"&gt;
                   ...
               &lt;/div&gt;
           &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>Since the whole page is done with bootstrap and Jquery, last parts of url </p>
  
  <p>some/url/<strong>first</strong></p>
  
  <p>some/url/<strong>second</strong></p>
  
  <p>some/url/<strong>third</strong></p>
  
  <p>are kind of ugly, since the accordion element lets me collapse and open respective inner bodies without reloading the page. So the question is: is there a way to pass a kwarg in reverse, that's going to be used in a view, not to determine the url in reverse()?</p>
  
  <p>the way I get url like <strong>some/url/</strong> and, still passing kwarg from the first .html page to the view?</p>