django-data-history


Namedjango-data-history JSON
Version 0.1.7 PyPI version JSON
download
home_page
SummaryA Django application that allows you to store detailed data in the change log and display the detailed information in object's history view.
upload_time2023-01-10 12:11:53
maintainer
docs_urlNone
authorzencore
requires_python
licenseMIT
keywords django-data-history
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://github.com/zencore-dobetter/pypi-images/raw/main/django-data-history/django-data-history.png)

## 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.



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "django-data-history",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "django-data-history",
    "author": "zencore",
    "author_email": "dobetter@zencore.cn",
    "download_url": "https://files.pythonhosted.org/packages/b0/23/5a4acf2976e774c756afc3414a159fe989aec091490f871134c94d8a5d5c/django-data-history-0.1.7.tar.gz",
    "platform": null,
    "description": "# django-data-history\n\nA Django application that allows you to store detailed data in the change log and display the detailed information in object's history view.\n\n## Install\n\n```\npip install django-data-history\n```\n\n## Usage\n\n```\n\n## add app: django_middleware_global_request\n## add app: django_middleware_request_id\n## add app: django_static_jquery_ui\n## add app: django_data_history\n## put django_data_history before django.contrib.admin\n\nINSTALLED_APPS = [\n    ...\n    \"django_middleware_global_request\",\n    \"django_middleware_request_id\",\n    \"django_static_jquery_ui\",\n    'django_data_history',\n    ...\n    'django.contrib.admin',\n    ...\n]\n\n## add middleware: django_middleware_global_request.middleware.GlobalRequestMiddleware\n## add middleware: django_middleware_request_id.middlewares.DjangoMiddlewareRequestId\nMIDDLEWARE = [\n    ...\n    \"django_middleware_global_request.middleware.GlobalRequestMiddleware\",\n    \"django_middleware_request_id.middlewares.DjangoMiddlewareRequestId\",\n    ...\n]\n\n# default to False, so you must set it to True to enable all models injection.\nSAVE_DATA_HISTORIES_FOR_ALL = True \n\n# if SAVE_DATA_HISTORIES_FOR_ALL==False, then only these models will be injected.\n# default to empty.\nSAVE_DATA_HISTORIES_FOR = [\n    \"your_app1.model_name1\"\n]\n\n# if SAVE_DATA_HISTORIES_FOR_ALL==True, these models will NOT be injected.\n# default to:\n# [\n#    \"sessions.session\",\n#    \"contenttypes.contenttype\",\n#    \"admin.logentry\",\n#    \"auth.permission\",\n# ]\nDO_NOT_SAVE_DATA_HISTORIES_FOR = [\n    \"your_app2.model_name2\",\n]\n\n```\n\n## Instance's history view\n\n![django-date-history-view-preview](https://github.com/zencore-dobetter/pypi-images/raw/main/django-data-history/django-data-history.png)\n\n## Releases\n\n### v0.1.0\n\n- First release.\n\n### v0.1.1\n\n- Fix ugettext_lazy problem.\n\n### v0.1.2\n\n- Add save_data_histories_for_fk_instance to fix inline edit history missing problem.\n\n### v0.1.3\n\n- Fix problems that field name has \"+\" in fields_map.\n\n### v0.1.5\n\n- Using django_middleware_request_id instead of implement request_id inside the app.\n\n### v0.1.6\n\n- Fix requirements in setup.py.\n\n### v0.1.7\n\n- Fix DataHistoryModelAdmin.get_data_histories function problem.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Django application that allows you to store detailed data in the change log and display the detailed information in object's history view.",
    "version": "0.1.7",
    "split_keywords": [
        "django-data-history"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "08321283f3cafd47dd378f9be168d282a24e42b13de79965b9410801a79353fc",
                "md5": "03bfd4a045a8c0ca3d1eaa270651ff50",
                "sha256": "0863f9f048684bafd65c0ad569ae7ac3b41e5189faf58c0d958729251943a26b"
            },
            "downloads": -1,
            "filename": "django_data_history-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "03bfd4a045a8c0ca3d1eaa270651ff50",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 15476,
            "upload_time": "2023-01-10T12:11:51",
            "upload_time_iso_8601": "2023-01-10T12:11:51.559468Z",
            "url": "https://files.pythonhosted.org/packages/08/32/1283f3cafd47dd378f9be168d282a24e42b13de79965b9410801a79353fc/django_data_history-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b0235a4acf2976e774c756afc3414a159fe989aec091490f871134c94d8a5d5c",
                "md5": "48218ce301fe8cfff9e790a1ad3d616a",
                "sha256": "3cd2050e0020c653e1563f715709723bf8a14c86fca58b0859b896fe8f93eb6b"
            },
            "downloads": -1,
            "filename": "django-data-history-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "48218ce301fe8cfff9e790a1ad3d616a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13036,
            "upload_time": "2023-01-10T12:11:53",
            "upload_time_iso_8601": "2023-01-10T12:11:53.711545Z",
            "url": "https://files.pythonhosted.org/packages/b0/23/5a4acf2976e774c756afc3414a159fe989aec091490f871134c94d8a5d5c/django-data-history-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-10 12:11:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "django-data-history"
}
        
Elapsed time: 0.03264s