Skip to content

andersinno/django-analog

Repository files navigation

Django-Analog

Simple per-model log models for Django apps.

Build Status Coverage Status Documentation Status

Compatibility

  • Django 2.2+, 3.0+
  • Python 3.6+

Basic Usage

from django.db import models
from analog import define_log_model

class MyModel(models.Model):
    value = models.IntegerField(default=0)

MyModelLogEntry = define_log_model(MyModel)

m = MyModel.objects.create(value=42)
m.add_log_entry('Something occurred')
assert m.log_entries.last().message == 'Something occurred'

Development

pip install -e .
pip install -r requirements-dev.txt

Tests

py.test

Documentation

sphinx-build -b html docs docs/_build