No project description provided
Project description
Django ModelForm History
django-modelformhistory will save your modelform updates and store the human-readable values. The main goal is only to show the users what has been updated on a modelForms. If you search for a more lowlevel history app, consider using django-reversion or django-simple-history
Warning
This package is under developpement. It has poor features and may be unstable. Don't use it in production yet.
Requirements
- Django 1.10.* / Django 1.11.*
- Tested under python 2.7 and 3.6
Install
pip install django-modelformhistory
Then, add modelformhistory
to INSTALLED_APPS
Usage
Inherit your ModelForm with HistoryModelFormMixin
from modelformhistory.forms import HistoryModelFormMixin
class MyModelForm(HistoryModelFormMixin, forms.ModelForm):
pass
You can get the user that has made the change by :
- Either pass the
request
on the form init - or implement a
get_history_user
method on your ModelForm that will return aauth.User
object
TODO
- Querying models history easily
- Provide generic views to see history by object, user & both
- Add more support and tests for filefield, boolean
- FR translation
ChangeLog
1.0 2019-06-14
- Initial Release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-modelformhistory-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc10a0a0e85808069c7e1c65c4e49d61b8823b930634a8c94529971ed775053a |
|
MD5 | 72b4ab74d704d2890e29930536dbd03c |
|
BLAKE2b-256 | af74a26346e777221587f3df289a47f29959206916d5883a5ed2421fb3d0e5dc |
Close
Hashes for django_modelformhistory-1.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b96549374387af3efbe809d5fa7b984cb0983be038f41087c8bce774d4ff52b |
|
MD5 | fb94ca537b2d784e62ec48d554131685 |
|
BLAKE2b-256 | dba4471d7aa5ed52a9073de2d70596add2d0ae4c36fdaea0cdcb6efd25f3e237 |