title: How to update the password and 'is_staff' status while using django.contrib.auth models
body: <p>I am developing a web based application in which i need to update the password and is_staff status of a user from Admin(template) page. To do this i created a template which are showing the list of all registered users. see the template:</p>
  
  <pre><code>   {% for obj in users_list.object_list %}
          &lt;tr class="{% cycle 'odd' 'even' %}"&gt;
              &lt;td&gt;{{obj}}&lt;/td&gt;
              &lt;td&gt;&lt;a href="{% url user_detail user.pk%}"&gt;{{obj.first_name}}&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;{{obj.last_name}}&lt;/td&gt;
              &lt;td&gt;{{obj.email}}&lt;/td&gt;
              &lt;td&gt;{{obj.is_staff}}&lt;/td&gt;
  </code></pre>
  
  <p>The above code showing the list of all users includes their Full name, Email and is_staff status. What i want, when admin will click on the user name (i uses the href attributes). It will get the option to update the password and is_staff status for a clicked user at open page.</p>
  
  <p>To do this i am not able to find out how to pass the id of user in following line. I tried with <strong>user.pk</strong> but it always given 1 to me. May be it is returning the current loginned user id but the loginned user is super user also:</p>
  
  <pre><code> &lt;td&gt;&lt;a href="{% url user_detail user.pk%}"&gt;{{obj.first_name}}&lt;/a&gt;&lt;/td&gt;
  </code></pre>