Insights

Extended log for Django

Photo of the author: Vera Mazhuga

Vera Mazhuga

  •  

1 min read.

Extended log, that tracks changes in Django models.


Sometimes there is a need to track all the changes that users make with model objects in Django. We wrote our version of django.contrib.admin.models.LogEntry in order to be able to register actions of our user upon the objects in the database.


Github repository: 
https://github.com/AxiaCore/django-extlog


Installation



Installing from pypi (using pip):
pip install django-extlog

Installing from github:
pip install -e git://github.com/AxiaCore/django-extlog.git#egg=django-extlog

Requirements


pip install django-extensions

Quick Setup



1. Add
django_extlo to your INSTALLED_APPS setting like this::

<pre data-gclp-id="0" data-initialized="true" lang="python">INSTALLED_APPS = (<br/> ...<br/> 'django_extlog',<br/>)<br/></pre>


2. Add AuditLoggingMiddleware to your MIDDLEWARE_CLASSES setting::
MIDDLEWARE_CLASSES = (
    ...
    'django_extlog.middleware.AuditLoggingMiddleware',
)

Screenshots




Learn more by receiving an email once a month.

Additional Insights

Check if an item is in array for Handlebars

How to check if an array contains a certain item in Handlebars template.

Author Vera Mazhuga Vera Mazhuga

Switching Between Compass Versions

Compass is a great framework that helps us writing clean styles using Sass, creating sprites, using mixins and among other f...

Photo of the author: Pablo Vallejo Pablo Vallejo