Skip to main content

Store model history and view/revert changes from admin site.

Project description

django-simple-history

Build Status Test Coverage PyPI Version Code Health

django-simple-history stores Django model state on every create/update/delete.

This app supports the following combinations of Django and Python:

Django

Python

1.11

2.7, 3.4, 3.5, 3.6

2.0

3.4, 3.5, 3.6

2.1

3.5, 3.6

Getting Help

Documentation is available at https://django-simple-history.readthedocs.io/

Issue tracker is at https://github.com/treyhunner/django-simple-history/issues

Pull requests are welcome. Read the CONTRIBUTING file for tips on submitting a pull request.

Changes

2.4.0 (2018-09-20)

  • Add pre and post create_historical_record signals (gh-426)

  • Remove support for django_mongodb_engine when converting AutoFields (gh-432)

  • Add support for Django 2.1 (gh-418)

2.3.0 (2018-07-19)

  • Add ability to diff HistoricalRecords (gh-244)

2.2.0 (2018-07-02)

  • Add ability to specify alternative user_model for tracking (gh-371)

  • Add util function bulk_create_with_history to allow bulk_create with history saved (gh-412)

2.1.1 (2018-06-15)

  • Fixed out-of-memory exception when running populate_history management command (gh-408)

  • Fix TypeError on populate_history if excluded_fields are specified (gh-410)

2.1.0 (2018-06-04)

  • Add ability to specify custom history_reason field (gh-379)

  • Add ability to specify custom history_id field (gh-368)

  • Add HistoricalRecord instance properties prev_record and next_record (gh-365)

  • Can set admin methods as attributes on object history change list template (gh-390)

  • Fixed compatibility of >= 2.0 versions with old-style middleware (gh-369)

2.0 (2018-04-05)

  • Added Django 2.0 support (gh-330)

  • Dropped support for Django<=1.10 (gh-356)

  • Fix bug where history_view ignored user permissions (gh-361)

  • Fixed HistoryRequestMiddleware which hadn’t been working for Django>1.9 (gh-364)

1.9.1 (2018-03-30)

  • Use get_queryset rather than model.objects in history_view. (gh-303)

  • Change ugettext calls in models.py to ugettext_lazy

  • Resolve issue where model references itself (gh-278)

  • Fix issue with tracking an inherited model (abstract class) (gh-269)

  • Fix history detail view on django-admin for abstract models (gh-308)

  • Dropped support for Django<=1.6 and Python 3.3 (gh-292)

1.9.0 (2017-06-11)

  • Add –batchsize option to the populate_history management command. (gh-231)

  • Add ability to show specific attributes in admin history list view. (gh-256)

  • Add Brazilian Portuguese translation file. (gh-279)

  • Fix locale file packaging issue. (gh-280)

  • Add ability to specify reason for history change. (gh-275)

  • Test against Django 1.11 and Python 3.6. (gh-276)

  • Add excluded_fields option to exclude fields from history. (gh-274)

1.8.2 (2017-01-19)

  • Add Polish locale.

  • Add Django 1.10 support.

1.8.1 (2016-03-19)

  • Clear the threadlocal request object when processing the response to prevent test interactions. (gh-213)

1.8.0 (2016-02-02)

  • History tracking can be inherited by passing inherit=True. (gh-63)

1.7.0 (2015-12-02)

  • Add ability to list history in admin when the object instance is deleted. (gh-72)

  • Add ability to change history through the admin. (Enabled with the SIMPLE_HISTORY_EDIT setting.)

  • Add Django 1.9 support.

  • Support for custom tables names. (gh-196)

1.6.3 (2015-07-30)

  • Respect to_field and db_column parameters (gh-182)

1.6.2 (2015-07-04)

  • Use app loading system and fix deprecation warnings on Django 1.8 (gh-172)

  • Update Landscape configuration

1.6.1 (2015-04-21)

  • Fix OneToOneField transformation for historical models (gh-166)

  • Disable cascading deletes from related models to historical models

  • Fix restoring historical instances with missing one-to-one relations (gh-162)

1.6.0 (2015-04-16)

  • Add support for Django 1.8+

  • Deprecated use of CustomForeignKeyField (to be removed)

  • Remove default reverse accessor to auth.User for historical models (gh-121)

1.5.4 (2015-01-03)

  • Fix a bug when models have a ForeignKey with primary_key=True

  • Do NOT delete the history elements when a user is deleted.

  • Add support for latest

  • Allow setting a reason for change. [using option changeReason]

1.5.3 (2014-11-18)

  • Fix migrations while using order_with_respsect_to (gh-140)

  • Fix migrations using south

  • Allow history accessor class to be overridden in register()

1.5.2 (2014-10-15)

  • Additional fix for migrations (gh-128)

1.5.1 (2014-10-13)

  • Removed some incompatibilities with non-default admin sites (gh-92)

  • Fixed error caused by HistoryRequestMiddleware during anonymous requests (gh-115 fixes gh-114)

  • Added workaround for clashing related historical accessors on User (gh-121)

  • Added support for MongoDB AutoField (gh-125)

  • Fixed CustomForeignKeyField errors with 1.7 migrations (gh-126 fixes gh-124)

1.5.0 (2014-08-17)

  • Extended availability of the as_of method to models as well as instances.

  • Allow history_user on historical objects to be set by middleware.

  • Fixed error that occurs when a foreign key is designated using just the name of the model.

  • Drop Django 1.3 support

1.4.0 (2014-06-29)

  • Fixed error that occurs when models have a foreign key pointing to a one to one field.

  • Fix bug when model verbose_name uses unicode (gh-76)

  • Allow non-integer foreign keys

  • Allow foreign keys referencing the name of the model as a string

  • Added the ability to specify a custom history_date

  • Note that simple_history should be added to INSTALLED_APPS (gh-94 fixes gh-69)

  • Properly handle primary key escaping in admin URLs (gh-96 fixes gh-81)

  • Add support for new app loading (Django 1.7+)

  • Allow specifying custom base classes for historical models (gh-98)

1.3.0 (2013-05-17)

  • Fixed bug when using django-simple-history on nested models package

  • Allow history table to be formatted correctly with django-admin-bootstrap

  • Disallow calling simple_history.register twice on the same model

  • Added Python 3 support

  • Added support for custom user model (Django 1.5+)

1.2.3 (2013-04-22)

  • Fixed packaging bug: added admin template files to PyPI package

1.2.1 (2013-04-22)

  • Added tests

  • Added history view/revert feature in admin interface

  • Various fixes and improvements

Oct 22, 2010

  • Merged setup.py from Klaas van Schelven - Thanks!

Feb 21, 2010

  • Initial project creation, with changes to support ForeignKey relations.

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-simple-history-2.4.0.tar.gz (33.0 kB view details)

Uploaded Source

Built Distribution

django_simple_history-2.4.0-py2.py3-none-any.whl (26.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-simple-history-2.4.0.tar.gz.

File metadata

  • Download URL: django-simple-history-2.4.0.tar.gz
  • Upload date:
  • Size: 33.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.20.0 CPython/3.6.3

File hashes

Hashes for django-simple-history-2.4.0.tar.gz
Algorithm Hash digest
SHA256 77a648542f6da7e17e62ab5e66528dea22b9d7f2eb92e4a1ba70ce6165b8ad83
MD5 71dbfbe0f19b98e50b844f5767c3411a
BLAKE2b-256 d82644414e10ec3a45a0e997841ad1858d54f9fe535fa11187ab573db065d152

See more details on using hashes here.

File details

Details for the file django_simple_history-2.4.0-py2.py3-none-any.whl.

File metadata

  • Download URL: django_simple_history-2.4.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 26.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.20.0 CPython/3.6.3

File hashes

Hashes for django_simple_history-2.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 22d511573b441b405584a045c7d241bb41808d4b5fc39c21e4a6b59b0e4b6ae6
MD5 81fdd578d98910b5704bdd1213bfd66f
BLAKE2b-256 0ea0b92c4c7532944431519abbf752847dd051515bee64ba40b1ea104aac84c8

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