0

i am customizing django admin so i added a custom button to a model admin by "extending admin/change_list.html" template

    {% block object-tools-items %}
      //add custom button here
    {% endblock %}

it looks like this

enter image description here

when i added a new package django-reversion for versioning of models which created new button for recovering data but repalced custom button which i created. I figured out that this is happening because package is also extending admin/change_list.html template and overiding object-tools-items block.

enter image description here

and i want some thing like this. Please help.

enter image description here

Ajeet Lakhani
  • 3,768
  • 2
  • 22
  • 37

1 Answers1

1

You were already told the answer when you raised this "bug" on the reversion Github.

Just extend the reversion/change_list.html template with your own custom template. :)

Instead of making a template with the path admin/change_list.html make an overriding template with the path reversion/change_list.html. The reason for this is that reversion does some overriding of the templates it self, so you need to make sure to play nice with those.