Skip to content

Write Django management command using the click CLI library

License

Notifications You must be signed in to change notification settings

BrightpathProgress/django-click

 
 

Repository files navigation

Django Click

Project information:

Automated code metrics:

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

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.

About

Write Django management command using the click CLI library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%