Skip to main content

Helpers for dealing with application settings

Project description

Django Click

Project information:

https://img.shields.io/pypi/v/django-click.svg https://img.shields.io/pypi/dm/django-click.svg https://img.shields.io/badge/docs-latest-brightgreen.svg https://img.shields.io/pypi/l/django-click.svg

Automated code metrics:

https://img.shields.io/travis/GaretJax/django-click.svg https://img.shields.io/coveralls/GaretJax/django-click/master.svg https://img.shields.io/codeclimate/github/GaretJax/django-click.svg https://img.shields.io/requires/github/GaretJax/django-click.svg

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

  • Free software: MIT license

  • Documentation: http://django-click.rtfd.org

  • Compatible with Django 1.4, 1.5, 1.6, 1.7 and 1.8, running on Python 2.7, 3.4 and PyPy

Installation

pip install django-click

Example

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

import djclick as click

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

And then call the command with:

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

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

History

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

Project details


Download files

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

Source Distribution

django-click-1.0.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_click-1.0.0-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-click-1.0.0.tar.gz.

File metadata

  • Download URL: django-click-1.0.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-click-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3915e04ff393cc50b02a601df288144980795c4e3d3c89809ed61c9901e7625e
MD5 514d636169fe6dc847ab96e9dece1ba4
BLAKE2b-256 6d7e2f1f9d19e0d0786b235d97dc55f7992617ef0068bd504e801d8f8abefb19

See more details on using hashes here.

File details

Details for the file django_click-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_click-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f3049067806d43e323a309b996b17e676da8ed4141cbf72afa790d52c9b606ba
MD5 31c0d80ee3996a2c954307b94f32cdf4
BLAKE2b-256 ab6344c0e8c2a01b0f55e2fb70272f04a7deab958f1ff8a2e3fd3784de1b3e3e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page