django-model-history
Enable in any Model class an change history of all inserts, updates and deletes
Installation
In your settings.py
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
#.....................#
'model_history',
)
Option 1: In your models.py
You only must to update the parent class of your model.
from django.db import models
class MyModel(models.Model):
....
from model_history.models import ModelHistoryProvider
class MyModel(ModelHistoryProvider):
....
...
Option 2: In your models.py
Or you can call directly to the create_history_model_class function
from django.db import models
from model_history.models import create_history_model_class, BaseModelHistory
class MyModel(models.Model):
....
MyModelHistory = create_history_model_class(MyModel, (BaseModelHistory,))
Development
You can get the last bleeding edge version of django-model-history by doing a clone of its git repository
git clone https://github.com/goinnn/django-model-history
Example project
In the source tree, you will find a directory called example. It contains a readily setup project that uses django-model-history. You can run it as usual:
python manage.py makemigrations python manage.py syncdb --noinput python manage.py runserver
Access in a browser to http://localhost:8000/
0.1.2 (2015-04-24)
Fix typo errors
0.1.1 (2015-04-24)
Fix typo errors
0.1.0 (2015-04-24)
Initial version
Metadata
Release files for django-model-history 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-model-history-0.1.2.tar.gz | 4.9 kB | Without provenance | Details for django-model-history-0.1.2.tar.gz |
Release files / django-model-history-0.1.2.tar.gz
| Download URL | django-model-history-0.1.2.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb709260be5c91e3c167718bc2effa6852b330474caa760f310c7d407903247f
|
|
BLAKE2b-256 checksum How to use checksums |
c6ff9b194214f7619e28ef28f39b4e69ddbb0067564e6133543bf1073e1c8498
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-model-history 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.