Metadata-Version: 2.0
Name: django-click
Version: 1.1.0
Summary: Write Django management command using the click CLI library
Home-page: https://github.com/GaretJax/django-click
Author: Jonathan Stoppani
Author-email: jonathan@stoppani.name
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Requires-Dist: six (>=1.9.0)
Requires-Dist: click (>5.0)
Provides-Extra: dev
Requires-Dist: Fabric; extra == 'dev'
Requires-Dist: livereload; extra == 'dev'
Requires-Dist: wheel; extra == 'dev'
Requires-Dist: check-manifest; extra == 'dev'
Requires-Dist: flake8; extra == 'dev'
Requires-Dist: mccabe; extra == 'dev'
Requires-Dist: pep8; extra == 'dev'
Requires-Dist: flake8-todo; extra == 'dev'
Requires-Dist: pep8-naming; extra == 'dev'
Requires-Dist: pyflakes; extra == 'dev'
Requires-Dist: Sphinx; extra == 'dev'
Requires-Dist: sphinx-autobuild; extra == 'dev'
Requires-Dist: sphinx-rtd-theme; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-flake8; extra == 'test'

============
Django Click
============

Project information:

.. image:: https://img.shields.io/pypi/v/django-click.svg
   :target: https://pypi.python.org/pypi/django-click

.. image:: https://img.shields.io/pypi/dm/django-click.svg
   :target: https://pypi.python.org/pypi/django-click

.. image:: https://img.shields.io/badge/docs-TODO-lightgrey.svg
   :target: http://django-click.readthedocs.org/en/latest/

.. image:: https://img.shields.io/pypi/l/django-click.svg
   :target: https://github.com/GaretJax/django-click/blob/master/LICENSE

Automated code metrics:

.. image:: https://img.shields.io/travis/GaretJax/django-click.svg
   :target: https://travis-ci.org/GaretJax/django-click

.. image:: https://img.shields.io/coveralls/GaretJax/django-click/master.svg
   :target: https://coveralls.io/r/GaretJax/django-click?branch=master

.. image:: https://img.shields.io/codeclimate/github/GaretJax/django-click.svg
   :target: https://codeclimate.com/github/GaretJax/django-click

.. image:: https://img.shields.io/requires/github/GaretJax/django-click.svg
   :target: https://requires.io/github/GaretJax/django-click/requirements/?branch=master

``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 (TODO)
* 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``:

.. code:: python

   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
<https://github.com/GaretJax/django-click/tree/master/djclick/test/testprj/testapp/management/commands>`_
for additional example commands and advanced usage.


=======
History
=======


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


