Django Audit is a simple Django app that tracks and logs requests to your application.
Project description
django-audit
Django Audit is a simple Django app that tracks and logs requests to your application.
Quick Start
- Install django-audit
pip install dj-audit
- Add
dj_auditto your INSTALLED_APPS:
INSTALLED_APPS = [
...,
"dj_audit"
]
- Add
dj_auditmiddleware:
MIDDLEWARE = [
...
"dj_audit.middleware.AuditMiddleware"
]
if you want access to the dj-audit dashboard, then add the following to your urls.py
urlpatterns = [
path("admin/", admin.site.urls),
path("dj-audit/", include('dj_audit.urls'))
]
- Run migrate
python manage.py migrate
Management commands
flush_auditlog - Cleans up dj-audit AuditLog table
python manage.py flush_auditlog
Customizing dj-audit
You have a couple options available to you to customize dj-audit a bit. These should be defined in your settings.py file.
DISABLE_AUDIT_LOG: bool: Disable or Enable dj_auditAUDIT_LOG_TEMPLATE: str: If set, the template here will be render when the user visits the audit log page (i.e /dj-audit/audit-logs/)REQUEST_STATUS_TEMPLATE: str: If set, the template here will be render when the user visits the request status page (i.e /dj-audit/request-status/)API_BASE_URL: str: Base url for API requests if any
Test
make test
or with coverage
make coverage_test
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dj_audit-0.0.9.tar.gz.
File metadata
- Download URL: dj_audit-0.0.9.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eea284187b4b45437eac74294a19f9027beb66a09de482615b0438807edf81f8
|
|
| MD5 |
223507c2ea10cad2ffce629defb86c2a
|
|
| BLAKE2b-256 |
20694ca3ed2eae90381fd3855162ac78cb6e6e13145c34efbce2fc96baa8032c
|
File details
Details for the file dj_audit-0.0.9-py3-none-any.whl.
File metadata
- Download URL: dj_audit-0.0.9-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a54bf958c349fc980f95a267e0e88a4ddf574ff64183d15aa05bb17e3053ec8
|
|
| MD5 |
a3c0aaf411deedfd5133e62a20946277
|
|
| BLAKE2b-256 |
0f04a03c566ba2b332f66c069231e106ae1ce6778588455bf98b7f556ac8d10d
|