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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d27cc51fab3bdca69fe25320c1ce1284a45c977045486b02da2396d25c3e175b |
|
MD5 | c3a73c9cba81c68fed4a9db933936905 |
|
BLAKE2b-256 | 69163ebca65b01bbcaa37d82851c3d6530127d71668d21941e0df2d7d3c79b54 |
Close
Hashes for django_modelformhistory-1.0.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e9e27b33df5d80819bd7348ce2d2ca78b849e2eabdeaae2daeff4f66f314d67 |
|
MD5 | 074c49b15412fa0f0d0b6c3f3d6c366f |
|
BLAKE2b-256 | 1bc4eb5641874ce4baa26f140fd87add3256f972ceb8e759153827f1e87c8db9 |