1:引入日志模块
from simple_history.admin import SimpleHistoryAdmin
2:admin类继承 SimpleHistoryAdmin
3:对应model添加字段历史记录字段
history = HistoricalRecords(excluded_fields=['user', 'create_time', 'update_time'])
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。