title: How to add a custom button on change_form template django admin
body: <p>I want to get the add a custom button with the history in <code>change_form</code>. I got the button like this:</p>
  
  <pre><code>{% extends "admin/change_form.html" %}
  {% block object-tools-items %}
  
      {{ block.super }}
  
      &lt;li&gt;
          &lt;a href="export/" class="addlink"&gt;Publish&lt;/a&gt;
      &lt;/li&gt;
  
  {% endblock %}
  </code></pre>
  
  <p>What I want is, if the published field is True, show <code>Unpublish</code> in the button instead of <code>Publish</code>.</p>
  
  <p><code>{{ adminform.fields.published }}</code> is giving me nothing. How can I access the value. Thank you</p>