A Django app to log change models fields.
Project description
History is a Django app to log change model fields
Detailed documentation is in the “docs” directory.
Quick start
Add “django_history” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'django_history', ... ]
Add middleware to your MIDDLEWARE:
MIDDLEWARE = [ ... 'django_history.middleware.ThreadLocals', ]
Add models fields to your OBSERVED_FIELDS:
OBSERVED_FIELDS = { 'accounts.User': ( 'username', 'first_name', 'middle_name', 'last_name', 'gender', 'phone', 'email', 'photo', 'birthday', ), ... }
Use to admin.py:
from django.contrib import admin from django_history.admin import HistoryBlockAdmin @admin.register(App) class AppAdmin(HistoryBlockAdmin, admin.ModelAdmin): ...
Run python manage.py migrate to create the history models.
Start the development server and visit http://127.0.0.1:8000/admin/ to create a history (you’ll need the Admin app enabled).
Visit http://127.0.0.1:8000/admin/django_history/action/ to participate in the all history.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-admin-history-2.2.0.tar.gz
(12.0 kB
view hashes)
Close
Hashes for django-admin-history-2.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2552ebff5aec252efb2773c8cf459ffb5d29cee649eacc59d5e255c8f15f3af1 |
|
MD5 | 44a539f1d94cc96a5fbaab01234d2fe6 |
|
BLAKE2b-256 | 05136fc506e391bc8b2169df12eb12aaf835436846755aa928923eefed138bd6 |