A Django application that allows you to store detailed data in the change log and display the detailed information in object's history view.
Project description
django-data-history
A Django application that allows you to store detailed data in the change log and display the detailed information in object's history view.
Install
pip install django-data-history
Usage
## add app: django_middleware_global_request
## add app: django_middleware_request_id
## add app: django_static_jquery_ui
## add app: django_data_history
## put django_data_history before django.contrib.admin
INSTALLED_APPS = [
...
"django_middleware_global_request",
"django_middleware_request_id",
"django_static_jquery_ui",
'django_data_history',
...
'django.contrib.admin',
...
]
## add middleware: django_middleware_global_request.middleware.GlobalRequestMiddleware
## add middleware: django_middleware_request_id.middlewares.DjangoMiddlewareRequestId
MIDDLEWARE = [
...
"django_middleware_global_request.middleware.GlobalRequestMiddleware",
"django_middleware_request_id.middlewares.DjangoMiddlewareRequestId",
...
]
# default to False, so you must set it to True to enable all models injection.
SAVE_DATA_HISTORIES_FOR_ALL = True
# if SAVE_DATA_HISTORIES_FOR_ALL==False, then only these models will be injected.
# default to empty.
SAVE_DATA_HISTORIES_FOR = [
"your_app1.model_name1"
]
# if SAVE_DATA_HISTORIES_FOR_ALL==True, these models will NOT be injected.
# default to:
# [
# "sessions.session",
# "contenttypes.contenttype",
# "admin.logentry",
# "auth.permission",
# ]
DO_NOT_SAVE_DATA_HISTORIES_FOR = [
"your_app2.model_name2",
]
Instance's history view
Releases
v0.1.0
- First release.
v0.1.1
- Fix ugettext_lazy problem.
v0.1.2
- Add save_data_histories_for_fk_instance to fix inline edit history missing problem.
v0.1.3
- Fix problems that field name has "+" in fields_map.
v0.1.5
- Using django_middleware_request_id instead of implement request_id inside the app.
v0.1.6
- Fix requirements in setup.py.
v0.1.7
- Fix DataHistoryModelAdmin.get_data_histories function problem.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-data-history-0.1.7.tar.gz
(13.0 kB
view details)
Built Distribution
File details
Details for the file django-data-history-0.1.7.tar.gz
.
File metadata
- Download URL: django-data-history-0.1.7.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cd2050e0020c653e1563f715709723bf8a14c86fca58b0859b896fe8f93eb6b |
|
MD5 | 48218ce301fe8cfff9e790a1ad3d616a |
|
BLAKE2b-256 | b0235a4acf2976e774c756afc3414a159fe989aec091490f871134c94d8a5d5c |
File details
Details for the file django_data_history-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: django_data_history-0.1.7-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0863f9f048684bafd65c0ad569ae7ac3b41e5189faf58c0d958729251943a26b |
|
MD5 | 03bfd4a045a8c0ca3d1eaa270651ff50 |
|
BLAKE2b-256 | 08321283f3cafd47dd378f9be168d282a24e42b13de79965b9410801a79353fc |