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.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc4840451fe137817ed9dc7bee89395c223e4d8196b095c7083349c1e6c85e76 |
|
MD5 | 9ad493679e687819c733945f121edb8c |
|
BLAKE2b-256 | 3af6b2eb39957d36d1e612dd63fac3d4974af7041655e92006bf164a1d307c4a |
Close
Hashes for django_modelformhistory-1.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06d402fce4fabaa95ca1326fde3f07527d43ba8fbf0ae32cfa8b411855a97b4d |
|
MD5 | bca1211f48f56e8f4bad518b247019a1 |
|
BLAKE2b-256 | f0b8a6d29c0ec91f87ae19e03c679c530b64833cb44364ac751bf7acbf2c16d4 |