Skip to content

GaretJax/django-click

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
October 6, 2021 13:40
September 7, 2021 14:50
June 13, 2020 08:12
August 5, 2020 14:26
September 7, 2021 14:57
September 11, 2015 00:47
April 20, 2018 14:17
September 11, 2015 22:50
March 17, 2022 08:33
September 11, 2015 00:54
September 7, 2021 14:51
October 6, 2021 13:28

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

Packages

No packages published

Languages