Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Write Django management command using the click CLI library

Project Description

Django Click

Project information:

Automated code metrics:

django-click is a library to easily write Django management commands using the click command line library.

  • Free software: MIT license
  • Documentation for the Click command line library:
  • Compatible with Django 1.8, 1.10, and 1.11, running on Python 2.7, 3.4, 3.5, 3.6 and PyPy.


pip install django-click


Create a command module as you would usually do, but instead of creating a class, just put a djclick command into <yourapp>/management/commands/

import djclick as click

def command(name):
    click.secho('Hello, {}'.format(name), fg='red')

And then call the command with:

$ ./ helloworld django-click
Hello, django-click

Check out the test commands for additional example commands and advanced usage.


2.0.0 - 2017-06-30

  • Drop support for unsupported Django versions (1.4, 1.5, 1.6, and 1.7).
  • Add official support for Django 1.10 and 1.11.
  • Add official support for python 3.5 (all Django versions) and 3.6 (Django 1.11 only).
  • Correctly handle click errors by outputting the formatted messages instead of a stack trace (#4).

1.2.0 - 2016-05-19

  • Allow custom lookups on ModelInstance parameter types.

1.1.0 - 2016-02-04

  • Add a ModelInstance parameter type to automatically retrieve model instances by their primary key

1.0.0 – 2015-09-14

  • Support for command groups
  • Added a pass_verbosity decorator
  • Improved test suite

0.1.1 – 2015-09-11

  • Django 1.4, 1.5, 1.6, 1.7 and 1.8 compatibility
  • Python 2.7 and 3.4 compatibility
  • 100% coverage test suite

0.1.0 – 2015-09-10

  • Initial release

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(8.5 kB) Copy SHA256 Hash SHA256
Wheel 3.4 Jun 30, 2017
(8.4 kB) Copy SHA256 Hash SHA256
Source None Jun 30, 2017

Supported By

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 Google Google Cloud Servers DreamHost DreamHost Log Hosting