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.
Set AL_LOG_ACTION_CHOICES in project settings.py file if need customize:
AL_LOG_ACTION_CHOICES = [ (CREATE, _("create")), (SUCCESS, _("success")), (VIEW, _("view")), (UPDATE, _("update")), (DELETE, _("delete")), (ERROR, _("error")), ]
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)
Metadata
Release files for django-actions-logger 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-actions-logger-0.3.1.tar.gz | 10.8 kB | Without provenance | Details |
Release files / django-actions-logger-0.3.1.tar.gz
| Download URL | django-actions-logger-0.3.1.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25637387912881c047c0ca1345c38dd3198850e5708ec82adf8fdd702a69b63b
|
|
BLAKE2b-256 checksum How to use checksums |
459c4137bde2f7a3bf5438d05dcfafd510ea41fe7f238595ceab019642f3f31c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|
Security for django-actions-logger 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.