{% extends "admin/change_form.html" %}

{% block object-tools %}
{% if change %}{% if not is_popup %}
  <ul class="object-tools">
    <li><a href="history/" class="historylink">History</a></li>
    <li><a href="{% url loginas-user-login object_id %}">Log in as user</a></li>
  </ul>
{% endif %}{% endif %}
{% endblock %}

{% extends "admin/change_form.html" %}

{% load url from future %}

{% block object-tools %}
{% if change %}{% if not is_popup %}
  <ul class="object-tools">
    <li><a href="history/" class="historylink">History</a></li>
    <li><a href="{% url "loginas-user-login" object_id %}">Log in as user</a></li>
  </ul>
{% endif %}{% endif %}
{% endblock %}

Make loginas compatible with Django 1.5.
Make loginas compatible with Django 1.5.
