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.4 2019-06-17
- Added support for BooleanField and FileField
1.0.3 2019-06-17
- Added more coverage
- Added FR translation
- Added HistoryBaseModel
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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66b899f905878477b12b38f3b7bbd4312373d417db2ab0e7171c6c7ea5b348a2 |
|
MD5 | d0d70fa8fe392503c54cd2c6deeaeb89 |
|
BLAKE2b-256 | 5dcd09a8455d6571d8422e65bb29f9ffddb13dd212d6dd71b841bd28e5ce88c9 |
Close
Hashes for django_modelformhistory-1.0.4-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c37cfd17314b06ab922e0e5d5c9d0aee3214128a5565135d82bb1a40f7e989a |
|
MD5 | 3e6b527df32c9919aa3d17fe517bc135 |
|
BLAKE2b-256 | 3f7932e792a2ed633aa8b1b70078e4d2f6ffec52cd4843680425fb010dd3aed3 |