Skip to main content

Generic event logger for Django models.

Project description

# django-timeline-logger
A reusable Django app to log actions and display them in a timeline


[![Build Status](https://travis-ci.org/maykinmedia/django-timeline-logger.svg?branch=master)](https://travis-ci.org/maykinmedia/django-timeline-logger)
[![codecov](https://codecov.io/gh/maykinmedia/django-timeline-logger/branch/develop/graph/badge.svg)](https://codecov.io/gh/maykinmedia/django-timeline-logger)
[![Coverage Status](https://coveralls.io/repos/github/maykinmedia/django-timeline-logger/badge.svg?branch=master)](https://coveralls.io/github/maykinmedia/django-timeline-logger?branch=master)
[![PyPI version](https://badge.fury.io/py/django-timeline-logger.svg)](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.

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

django-timeline-logger-0.3.1.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

django-timeline-logger-0.3.1.linux-x86_64.tar.gz (11.2 kB view details)

Uploaded Source

File details

Details for the file django-timeline-logger-0.3.1.tar.gz.

File metadata

File hashes

Hashes for django-timeline-logger-0.3.1.tar.gz
Algorithm Hash digest
SHA256 a4b434fe63bfcf5cc898ccdef7b8de8d925fba7e1c2e6ba33de9c1c79d6ca18c
MD5 1231ab65415ba72dfe0fb284c1200599
BLAKE2b-256 b421d65c35927ae296321a8cb80786026227889874b64a3cc28607edb957474a

See more details on using hashes here.

File details

Details for the file django-timeline-logger-0.3.1.linux-x86_64.tar.gz.

File metadata

File hashes

Hashes for django-timeline-logger-0.3.1.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 b31f17e5e55533b345147ce13a180d8de66edb9177489af58065a01d37717d7a
MD5 98e00546fad6c22b5ecb230f146e8d51
BLAKE2b-256 0863ef93f395ff4c5049b9957723645e407c526139ff5c2b8227dd84224ea1d8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page