Tying in to Django Admin's Model History

后端 未结 5 1100
小鲜肉
小鲜肉 2020-11-27 09:30

The Setup:

  • I\'m working on a Django application which allows users to create an object in the database and then go back and edit it as much as
5条回答
  •  庸人自扰
    2020-11-27 10:33

    The admin's change history log is defined in django.contrib.admin.models, and there's a history_view method in the standard ModelAdmin class.

    They're not particularly clever though, and fairly tightly coupled to the admin, so you may be best just using these for ideas and creating your own version for your app.

提交回复
热议问题