# django-timeline-logger
A reusable Django app to log actions and display them in a timeline
[](https://travis-ci.org/maykinmedia/django-timeline-logger)
[](https://codecov.io/gh/maykinmedia/django-timeline-logger)
[](https://coveralls.io/github/maykinmedia/django-timeline-logger?branch=master)
[](https://badge.fury.io/py/django-timeline-logger)
## Prerequisites
This project uses `django.contrib.postgres.JSONField`, and as such, you need:
* at least Django 1.9
* at least PostgreSQL 9.4
* at least psycopg2 2.5.4
## 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.
A reusable Django app to log actions and display them in a timeline
[](https://travis-ci.org/maykinmedia/django-timeline-logger)
[](https://codecov.io/gh/maykinmedia/django-timeline-logger)
[](https://coveralls.io/github/maykinmedia/django-timeline-logger?branch=master)
[](https://badge.fury.io/py/django-timeline-logger)
## Prerequisites
This project uses `django.contrib.postgres.JSONField`, and as such, you need:
* at least Django 1.9
* at least PostgreSQL 9.4
* at least psycopg2 2.5.4
## 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.
Metadata
Release files for django-timeline-logger 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-timeline-logger-0.3.tar.gz | 6.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django-timeline-logger-0.3.linux-x86_64.tar.gz | Details |
Total release size: 17.6 kB
Release files / django-timeline-logger-0.3.tar.gz
| Download URL | django-timeline-logger-0.3.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2ae81222f40fb4a1184e94871c8a38984f73f176350f02a4ea4fb2ab53a05b4
|
|
BLAKE2b-256 checksum How to use checksums |
c1dd596f0a5cc15a2aa668d693dcc88b9bb2b1ff4016a5bd8789f9f51b9251fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django-timeline-logger-0.3.linux-x86_64.tar.gz
| Download URL | django-timeline-logger-0.3.linux-x86_64.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f7ebd95c2c9419e0985cb7110384c01cd74b6e532da82b26926c6a26bf03bd0
|
|
BLAKE2b-256 checksum How to use checksums |
138e253e10a5f01910530ff928334607292ac38b8496f76e46e0030924829645
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |