




djcli is the package , a new CLI under design phase, it is a simple python package, that provides a command with name djcli
, to do more with Django on the CLI:
$ pip install djcli
$ export DJANGO_SETTINGS_MODULE=your.settings
$ djcli create auth.user username=pony is_superuser=1
$ djcli chpasswd /path/to/password username=pony
$ echo yourpassword | djcli chpasswd - username=pony
$ djcli list auth.user username is_superuser | pk | username | is_superuser | | 1 | pony | True | | 2 | ninja | False |
$ djcli list auth.user username is_superuser=true | pk | username | is_superuser | | 1 | ninja | True |
$ djcli count is_superuser=true 1
$ djcli delete auth.user username=pony –noinput 1
$ djcli create sites.site name=‘awesome site’ domain=awesome.com
Because automation software should be automatically made available in an automated way.
Don’t listen to people who tell you otherwise :D
Because we need to break out of the framework’s inversion of control to make such a rich user experience from the command line: with dynamic options.
Always, why not being able to run a forms on the command line given a dotted import path, both in interactive, and non interactive mode ?
Or, why not provision a model from a file tree of YAML files to replace loaddata ?
Last time I needed those features, I passed, but it’s over now.
Nobody cares about the stable release of djcli, not even me.