|
| 1 | +============ |
| 2 | +Django Click |
| 3 | +============ |
| 4 | + |
| 5 | +.. image:: https://img.shields.io/travis/GaretJax/django-click.svg |
| 6 | + :target: https://travis-ci.org/GaretJax/django-click |
| 7 | + |
| 8 | +.. image:: https://img.shields.io/pypi/v/django-click.svg |
| 9 | + :target: https://pypi.python.org/pypi/django-click |
| 10 | + |
| 11 | +.. image:: https://img.shields.io/pypi/dm/django-click.svg |
| 12 | + :target: https://pypi.python.org/pypi/django-click |
| 13 | + |
| 14 | +.. image:: https://img.shields.io/coveralls/GaretJax/django-click/master.svg |
| 15 | + :target: https://coveralls.io/r/GaretJax/django-click?branch=master |
| 16 | + |
| 17 | +.. image:: https://img.shields.io/badge/docs-latest-brightgreen.svg |
| 18 | + :target: http://django-click.readthedocs.org/en/latest/ |
| 19 | + |
| 20 | +.. image:: https://img.shields.io/pypi/l/django-click.svg |
| 21 | + :target: https://github.com/GaretJax/django-click/blob/develop/LICENSE |
| 22 | + |
| 23 | +.. image:: https://img.shields.io/requires/github/GaretJax/django-click.svg |
| 24 | + :target: https://requires.io/github/GaretJax/django-click/requirements/?branch=master |
| 25 | + |
| 26 | +.. .. image:: https://img.shields.io/codeclimate/github/GaretJax/django-click.svg |
| 27 | +.. :target: https://codeclimate.com/github/GaretJax/django-click |
| 28 | +
|
| 29 | +django-click is a library to easily write django management commands using the |
| 30 | +click command line library. |
| 31 | + |
| 32 | +* Free software: MIT license |
| 33 | +* Documentation: http://django-click.rtfd.org |
| 34 | + |
| 35 | + |
| 36 | +Installation |
| 37 | +============ |
| 38 | + |
| 39 | +:: |
| 40 | + |
| 41 | + pip install django-click |
| 42 | + |
| 43 | + |
| 44 | +Example |
| 45 | +======= |
| 46 | + |
| 47 | +Create a command module as you would usually do, but instead of creating a |
| 48 | +class, just put a djclick command into it:: |
| 49 | + |
| 50 | + import djclick as click |
| 51 | + |
| 52 | + @click.command() |
| 53 | + @click.argument('name') |
| 54 | + def command(name): |
| 55 | + click.secho('Hello, {}'.format(name), fg='red') |
0 commit comments