<h4>Current user</h4>

{% if request.user.is_authenticated %}
  <table>
    <tr>{% for x,y in current %}<th>{{ x }}</th>{% endfor %}</tr>
    <tr>{% for x,y in current %}<td>{{ y }}</td>{% endfor %}</tr>
  </table>
{% else %}
  <p>Not logged in.</p>
{% endif %}

<h4>Recent users</h4>

<ul>
  {% for user in users %}
  <li>
    <form method="POST" action="{% url debug-userpanel-login user.pk %}">
      {% csrf_token %}
      {% if next %}
      <input type="hidden" name="next" value="{{ next }}">
      {% endif %}
      <button class="login" type="submit">{{ user }}</button>
    </form>
  </li>
  {% endfor %}
</ul>

<h4>Current user</h4>

{% if request.user.is_authenticated %}
  <table>
    <tr>{% for x,y in current %}<th>{{ x }}</th>{% endfor %}</tr>
    <tr>{% for x,y in current %}<td>{{ y }}</td>{% endfor %}</tr>
  </table>
{% else %}
  <p>Not logged in.</p>
{% endif %}

<h4>Recent users</h4>

<ul>
  {% for user in users %}
  <li>
    <form method="POST" action="{% url debug-userpanel-login user.pk %}">
      {% csrf_token %}
      {% if next %}
      <input type="hidden" name="next" value="{{ next }}">
      {% endif %}
      <button class="login" type="submit">{{ user }}</button>
    </form>
  </li>
  {% endfor %}
</ul>

<h4>Login as any user</h4>

<form method="POST" action="{% url debug-userpanel-login-form %}">
  {{ form.as_p }}
  <button type="submit">Login</button>
</form>

Add form to login as any user.
Add form to login as any user.

Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@playfire.com>
