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)
[![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.
## Documentation
The extended documentation is available on [Read the Docs](http://django-timeline-logger.readthedocs.io/en/latest/).
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)
[![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.
## Documentation
The extended documentation is available on [Read the Docs](http://django-timeline-logger.readthedocs.io/en/latest/).
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
Close
Hashes for django-timeline-logger-0.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 867ff91162396aa9838af148d64883c89be737e168a7677e55306dada713db6c |
|
MD5 | 85a6729f8938b94e729b78cf05a95867 |
|
BLAKE2b-256 | 21c50cce99e6bcd55ebf9921f40a9b29372a0ca126391be15d21fde52d7835e7 |
Close
Hashes for django_timeline_logger-0.5.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d9fd59a449b3bbeed7e5fc45a5b5edac2366cf15f3af5f70e2d4b9f1150746e |
|
MD5 | fbbf71c78f6d09ff7c8ed53a08e97495 |
|
BLAKE2b-256 | 0414727e424c776a315ac8afcd5b0ebdebd173810b3910ce766c2e8f1145e4ff |