Skip to main content

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

django-date-history-view-preview

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.

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-data-history-0.1.5.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

django_data_history-0.1.5-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file django-data-history-0.1.5.tar.gz.

File metadata

  • Download URL: django-data-history-0.1.5.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for django-data-history-0.1.5.tar.gz
Algorithm Hash digest
SHA256 cb20c1f173b9e5d79a6c0fd208afc6e2a3656749446ae5d19938bfe4d78608fe
MD5 d5bc7a0e4b7c51ec473468cc81644341
BLAKE2b-256 cae5c880a891930b00e9a80cb36fc285bf4c68e8ed633e08427ea4f9514d07bd

See more details on using hashes here.

File details

Details for the file django_data_history-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for django_data_history-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9966fbd992a634c3319801aca880320d91375fb6b1a186e5c309d6c6d5fb2263
MD5 903517015bb37814a382eed6db310661
BLAKE2b-256 ae4919a7a3a96452792776804de5c1873530bfc5e594b2a960c4a9d3a2c9b10b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page