github: django-simple-history
- 安装
$ pip install django-simple-history
- 配置
在Settings中添加
INSTALLED_APPS = [
# ...
'simple_history',
]
MIDDLEWARE = [
# ...
'simple_history.middleware.HistoryRequestMiddleware',
]
- 记录
在models中
github: django-simple-history
$ pip install django-simple-history
INSTALLED_APPS = [
# ...
'simple_history',
]
MIDDLEWARE = [
# ...
'simple_history.middleware.HistoryRequestMiddleware',
]
在models中