title: Django url error in template with password_change view
body: <p>I am using Django <code>1.2.3-3+squeeze1</code> with Debian squeeze.</p>
  
  <p>I am trying to use the Django password change view in my application
  corresponding to <code>django.contrib.auth.views.password_change</code>. This
  looks like it should be straightforward, but I have been having
  problems.</p>
  
  <p>For simplicity and completeness, I will point to my application files
  online. The application is <a href="https://bitbucket.org/faheem/bixfile" rel="nofollow">bixfile</a>. The
  corresponding Django project is <a href="https://bitbucket.org/faheem/bixproj" rel="nofollow">bixproj</a>.</p>
  
  <p>The relevant line in url.py is
  <a href="https://bitbucket.org/faheem/bixfile/src/49bcbab3a7be/urls.py#cl-65" rel="nofollow">https://bitbucket.org/faheem/bixfile/src/49bcbab3a7be/urls.py#cl-65</a>,
  namely</p>
  
  <pre><code>url(r'^password_change/$', 'django.contrib.auth.views.password_change', {'post_change_redirect':reverse('top_folders')}, name="password_change"),
  </code></pre>
  
  <p>This breaks any template in which it is used. Currently, I'm only
  using it at line
  <a href="https://bitbucket.org/faheem/bixfile/src/71de33d01f43/templates/calgb_base.html#cl-21" rel="nofollow">https://bitbucket.org/faheem/bixfile/src/71de33d01f43/templates/calgb_base.html#cl-21</a>
  of the template calgb_base.html, which is included in a bunch of
  templates including the top level index view, corresponding to the
  template
  <a href="https://bitbucket.org/faheem/bixfile/src/71de33d01f43/templates/index.html" rel="nofollow">https://bitbucket.org/faheem/bixfile/src/71de33d01f43/templates/index.html</a>. The
  line in calgb_base.html is</p>
  
  <pre><code>&lt;li&gt;&lt;a class="side" href="{% url password_change %}"&gt;Password Change&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>When I navigate to the top <code>index</code> view corresponding to
  <a href="https://bitbucket.org/faheem/bixfile/src/71de33d01f43/urls.py#cl-16" rel="nofollow">https://bitbucket.org/faheem/bixfile/src/71de33d01f43/urls.py#cl-16</a>
  and
  <a href="https://bitbucket.org/faheem/bixfile/src/71de33d01f43/views.py#cl-203" rel="nofollow">https://bitbucket.org/faheem/bixfile/src/71de33d01f43/views.py#cl-203</a>
  I see an error, beginning with</p>
  
  <pre><code>Caught NoReverseMatch while rendering: Reverse for 'password_change'
  with arguments '()' and keyword arguments '{}' not found.
  </code></pre>
  
  <p>I doubt the full traceback is useful, but I have pasted it at
  <a href="http://paste.lisp.org/display/122996" rel="nofollow">http://paste.lisp.org/display/122996</a>.</p>
  
  <p>This error is reproducible with both Apache 2.2 and mod-wsgi, as well
  as the builtin Django test server (see below).</p>
  
  <p>If I go directly the the /password_change/ relative url, I see the
  password change form as expected.</p>
  
  <p>The weird thing is that all the tests I have written to test this
  pass, and produce the expected result. See for example
  <a href="https://bitbucket.org/faheem/bixfile/src/71de33d01f43/tests.py#cl-313" rel="nofollow">testIndexUrl</a>
  ,
  <a href="https://bitbucket.org/faheem/bixfile/src/71de33d01f43/tests.py#cl-317" rel="nofollow">testIndexView</a>
  and
  <a href="https://bitbucket.org/faheem/bixfile/src/71de33d01f43/tests.py#cl-1029" rel="nofollow">test_password_change_url</a>.</p>
  
  <p>You can run the tests from the <code>bixproj</code> directory with</p>
  
  <pre><code>python manage.py test
  </code></pre>
  
  <p>If you want to try to reproduce this error it is comparatively easy.</p>
  
  <p>First download the project (<code>bixproj</code>) and application repositories
  (<code>bixfile</code>). So</p>
  
  <pre><code>hg clone ssh://hg@bitbucket.org/faheem/bixproj
  hg clone ssh://hg@bitbucket.org/faheem/bixfile
  </code></pre>
  
  <p>Then make sure bixfile is in the Python path. Change DATABASES to use
  sqlite. Then change</p>
  
  <pre><code>LOGIN_URL = '/'+BIXFILE_NAME+'/login/'
  LOGIN_REDIRECT_URL= '/'+BIXFILE_NAME+'/'
  </code></pre>
  
  <p>to</p>
  
  <pre><code>LOGIN_URL = '/login/'
  LOGIN_REDIRECT_URL= '/'
  </code></pre>
  
  <p>Then running</p>
  
  <pre><code>python manage.py runserver
  </code></pre>
  
  <p>in the <code>bixproj</code> directory on a local machine and going to the default url
  <code>http://127.0.0.1:8000/</code> should display the error.</p>
  
  <p>I expect I can produce a minimal example showing the error if
  necessary, but I'm really hoping this error is obvious and I don't
  have to. Thanks in advance.</p>