Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

A Django app to log management commands

Project Description

Django CommandLog adds the feature of logging the django management commands into the database so it’s available in the admin interface.

We’ve been using this to check the result of scheduled management commands directly through the admin interface. It works by copying the stream of stdout and stderr.

The decorator also adds some helper methods, see below.

Quick start

  1. Add “django_commandlog” to your INSTALLED_APPS settings like this:
  1. Run python migrate to add the tables of django_commandlog to your database.

3. To log an admin command, add the @command_log decorator above the class (see example below). Thus, it currently supports only custom management commands. If you wish to add this to default django manage commands you’ll have to create a child class with the decorator. Pull/Merge requests are welcome with a fix for this.

class SampleCommand(BaseCommand):

    def handle(self, *args, **options):


There are currently no configuration values.

Helper methods

When your class is decorated with @command_log, you have access to additional methods.

CommandLog includes counters for basic CRUD operations (Create, Read, Update, Delete) which can be used through helper methods provided:


There are two fields used to track the commands or runs: reference and user. Reference is any number you want to track in your manage commands.

You can also add a user to the tracking by using the add_log_user(user) method. user can be a string which will be kept as-is or you can use a settings.AUTH_USER_MODEL object.

# or


  • python 2.7, 3.4, 3.5
  • django 1.10

Tested on Django 1.10.3

Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-commandlog-0.1.10.tar.gz (10.0 kB) Copy SHA256 Checksum SHA256 Source Nov 28, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting