Generic event logger for Django models.
Project description
A reusable Django app to log actions and display them in a timeline
Prerequisites
This project uses django.db.models.JSONField, and as such, you need:
at least Django 3.2+
a database supporting django.db.models.JSONField
A modern setuptools version
Installation
Install from PyPI by running
pip install django-timeline-logger
Add 'timeline_logger' to your INSTALLED_APPS.
Run the migrations:
python manage.py migrate
Usage in templates
A custom template tag is provided to render the message of a log entry, for example:
{% extends "timeline_logger/base.html" %} {% load timeline %} {% block timeline %} <ul class="timeline__list col__22--vw"> {% for log in object_list %} <li class="timeline__entry"> {% render_message log in_view=True %} </li> {% endfor %} </ul> {% endblock timeline %}
This way, you can pass extra context to the template used for the log object.
Documentation
The extended documentation is available on Read the Docs.
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
File details
Details for the file django_timeline_logger-5.0.0.tar.gz
.
File metadata
- Download URL: django_timeline_logger-5.0.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07a623bced21069df84cd872003e749186fd10288ac8fb8e70d0bd0c9461629b |
|
MD5 | 5498b982724773920bea1464caee56c5 |
|
BLAKE2b-256 | ea3c053673b3b1a105ea20cb1a967896116dda5b12a5ecaf75a454aa77e6a20a |
File details
Details for the file django_timeline_logger-5.0.0-py3-none-any.whl
.
File metadata
- Download URL: django_timeline_logger-5.0.0-py3-none-any.whl
- Upload date:
- Size: 21.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edbc35eda95e9c9e1bb00dd4a7044a356f791613906597ff4390b02add6ef1e5 |
|
MD5 | 2457787c965190d6b6bc4dcff62fa59c |
|
BLAKE2b-256 | 400b8d4f833b011fc2c082725c79eb6adb1e0f718e47823b7652947c4771b399 |