Overriding change_form.html and accessing the object instance

Here's an example for a custom change_form.html located in app/templates/admin/appname/modelname/change_form.html - and the cool thing is that it accesses the actual instance of the object, which I found to be very convenient and undocumented. If you want it to be more explicit than access through the builtin context variable adminform.form.instance, you can also make your own change_view.

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





{% block object-tools %}  
  {{ block.super }}


## {{ adminform.form.instance }}


{% endblock %}