title: Django return HttpResponseRedirect to an url with a parameter
body: <p>I have a situation in my project where i need to make a <strong>redirection</strong> of the user to an <code>url</code> containing a parameter, it is declared in the <strong>urls.py</strong> like:</p>
  <pre><code>url(r'^notamember/(?P&lt;classname&gt;\w+)/$', 
                             notamember,
                             name='notamember'),)
  </code></pre>
  <p>How can i put that parameter in the return <code>HttpResponseRedirect</code>? I tried like:</p>
  <pre><code>return HttpResponseRedirect('/classroom/notamember/classname')
  </code></pre>
  <p>anyway, this is foolish, i know, i cannot consider the <strong>classmane</strong> as a parameter.
  For clarity, my <strong>view.py</strong> is:</p>
  <pre><code>def leave_classroom(request,classname):
      theclass = Classroom.objects.get(classname = classname)
      u = Membership.objects.filter(classroom=theclass).get(member = request.user).delete()
      return HttpResponseRedirect('/classroom/notamember/theclass/')
  </code></pre>
  <p>How can i include the variable <strong>theclass</strong> in that <code>url</code>?
  Thanks a lot!</p>