[Django]-Accessing the object in a django admin template

87👍

A quick look at django.contib.admin.options’ change_view method shows the original object is included as a context variable called original. So if you’re simply overriding change_form.html itself you can get to the object being edited via {{ original }}.

Leave a comment