A Django app that keeps a log of user actions or changes in objects
Project description
A Django app that keeps a log of user actions or changes in objects You can log arbitrary action with user and optional info that goes with your action.
this code forked from django-auditlog and add my new ideas
Quick start
Add “actionslog” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'actionslog', ]
Run python manage.py migrate to create models.
Usage
Simple:
status_msg = 'Reset password %s' % ('success' if success else 'error',) la_kwargs = { 'request': request, 'instance': obj, 'user': request.user, 'action_info': {'info': status_msg}, } LogAction.objects.create_log_action(**la_kwargs)
or
status_msg = 'Reset password %s' % ('success' if success else 'error',) la_kwargs = { 'request': request, 'instance': obj, 'user': request.user, 'action': LogAction.SUCCESS if success else LogAction.ERROR, 'changes': status_msg, } LogAction.objects.create_log_action(**la_kwargs)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-actions-logger-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5a833dba7ffe2ff0001cd0c563e01fffbda403741b4efa7dccfee70ae3016b1 |
|
MD5 | 6f1e6cf740fa1426e26a9ccf0aeb1590 |
|
BLAKE2b-256 | ed6140c19ca41ffba4cfcedb400ad27953cc2b82cad443d9a65fc62c77adc834 |