معرفی شرکت ها


django-model-audit-history-1.1.3


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

A Django model field for PostgreSQL to store changes to a model chronologically.
ویژگی مقدار
سیستم عامل -
نام فایل django-model-audit-history-1.1.3
نام django-model-audit-history
نسخه کتابخانه 1.1.3
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Henrik Heimbuerger
ایمیل نویسنده henrik@smileback.com
آدرس صفحه اصلی https://github.com/nexto/django-model-audit-history
آدرس اینترنتی https://pypi.org/project/django-model-audit-history/
مجوز MIT License
# django-model-audit-history Provides an `AuditHistory` model field to store a chronological record of changes to a model (“audit history”) on the model. The historical record is stored in a designated JSON field, so no additional database tables are required. Supports Django 1.11 (and possibly Django 2.x in the future) and PostgreSQL database backends. ## CI [![Build Status](https://travis-ci.org/nexto/django-model-audit-history.svg?branch=master)](https://travis-ci.org/nexto/django-model-audit-history) ## Usage The basic principles are as follows: 1. To enable this for a model, you have to make these changes: * add an `AuditHistoryField` named `history` to the model * add the `AuditHistoryMixin` to the model class * create ModelAdmin: ``` ModelAdmin(AuditHistoryAdminMixin, admin.ModelAdmin): pass ``` * add your ModelAdmin to admin site `admin.site.register(model, ModelAdmin)` 2. Then, instead of calling regular `save()` on the model after changing it, call `save_with_audit_record()` instead (passing in some meta data you want saved alongside, e.g. the `event` that caused the change, the `user` triggering it and some `payload` usually the set of modified fields. 3. The history will appear in human-readable form in the admin. That’s pretty much all there is to it. ## Testapp setup and first steps 1. Install Postgres locally (e.g. 10.x) 2. Create local database `audithistory`, owned by user `dev` 3. Create a virtualenv and activate: `virtualenv venv`, then `source venv/bin/activate` 4. Install dependencies into virtualenv: `pip install --requirement requirements.txt` 5. Run `manage.py migrate` 6. Run `manage.py createsuperuser` 7. Run `manage.py runserver` 8. Create new model on http://localhost:8000/admin/test_app/blogpost/ 9. Edit model via http://localhost:8000/edit/1/ 10. Reload admin page and inspect history record ## Run tests in local environment: * Run `manage.py test` (Ensure that user dev has rights to db creation `alter user dev createdb;`)


نیازمندی

مقدار نام
<2.0 Django
- ipaddress
- six


زبان مورد نیاز

مقدار نام
>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* Python


نحوه نصب


نصب پکیج whl django-model-audit-history-1.1.3:

    pip install django-model-audit-history-1.1.3.whl


نصب پکیج tar.gz django-model-audit-history-1.1.3:

    pip install django-model-audit-history-1.1.3.tar.gz