{% extends 'admin/change_form.html' %} {% block object-tools-items %}
  • Download file
  • {{ block.super }} {% endblock %} {% block content %} {{ block.super }} {% if file_type in "pdf jpg png" %}
    {% if file_type == "pdf" %} {% include "admin/documents/document/viewers/viewer_pdf.html" %} {% endif %} {% if file_type in "jpg png" %} {% include "admin/documents/document/viewers/viewer_image.html" %} {% endif %}
    {% endif %} {% if next_object %} {% endif %} {% endblock content %} {% block footer %} {{ block.super }} {# Hack to force Django to make the created date a date input rather than `text` (the default) #} {% endblock footer %}