Skip to main content

Tools for logging changes made from Django admin

Project description


django-admin-blame is a Django app providing mixins for tracking date and author of model changes from django admin.

Build Status codecov PyPI version


Often it is useful to know date and author of object creation or modification. django-admin-blame provides a django model mixin with fields:

  • created (datetime) - timestamp of object creation
  • created_by (FK to User) - reference to an admin user who created this object through admin site
  • modified (datetime) - timestamp of last object modification
  • modified_by (FK to User) - reference to an admin user who made last changes to this object through admin site. If changes has been made somewhere else, field value is reset to None.


pip install django-admin-blame

Working example is in testproject.testapp.

  1. Enable middleware in django settings:
  2. Add model mixin to your models:
    from django.db import models
    from admin_log.models import AdminLogMixin
    class Subject(AdminLogMixin, models.Model):
        title = models.CharField(max_length=50)
        content = models.TextField()
  3. Add admin mixin to corresponding model admin:
    from django.contrib import admin
    from admin_log.admin import AdminLogMixin
    from testproject.testapp import models
    class SubjectAdmin(AdminLogMixin, admin.ModelAdmin):

Now you have readonly fields with date and author of last revision in admin "edit" page.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-admin-blame-1.0.0.tar.gz (5.6 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page