title: Django admin overriding - adding a print button
body: <p>I would like to create a "print button" inside an app in django admin interface to load a page in another browser tab (a view that is already coded) and let the user print it directly from admin interface. </p>
  
  <p>I used the override to add a "print" button near the "history" button following this example: 
  <a href="https://docs.djangoproject.com/en/1.5/ref/contrib/admin/#overriding-admin-templates" rel="nofollow">overriding admin templates</a></p>
  
  <p>I have a model named "Card", each card has a unique number which is used to load a corresponding view, now I need to take this number and pass it to the print button to redirect to the page I want to print. How to get it?</p>
  
  <p>I tried this </p>
  
  <p><code>&lt;a href="{{ ROOT_URL }}/my_app/{{ card.number }}" class="historylink"&gt;Print&lt;/a&gt;</code></p>
  
  <p>but it redirect to the root directory and doesn't take the value I need from the model.</p>