Command Line

The django-zero command line tool will help you manage your project. It is not the django-admin or script that is available in usual django projects, although you can run the django management tool from the CLI.

General considerations

You can run the CLI either from the console script, or by executing the module. The two following commands are equivalent:

$ django-zero
$ python -m django_zero

The CLI consists of "subcommands", available from the entrypoint command described above. You can obtain more informations by setting python's logging level to DEBUG, using the --debug flag (or -D).

$ django-zero [--debug|-D] <subcommand>

or using the module...

$ python -m django_zero [--debug|-D] <subcommand>

Scaffolding commands

django-zero contains some cookiecutter templates to help you scaffold your projects.

Project creation

To create a new django-zero project:

$ django-zero create project <project-name>

Command will create a new directory with the provided name, ready to roll.

App creation

Once you're in a project, you can use the app creation script:

$ django-zero create app <app-name>

By convention, the application will live in apps/<app-name>.

Lifecycle commands

Lifecycle commands will help you during development and deployment.


Updates project dependencies, both local (to your project) and global (to one django-zero install, in a virtualenv for example). Python package install is not enough, as this will also install Node.js modules.

$ django-zero install


Cleanup Node.js modules.

$ django-zero uninstall


Starts a honcho manager with the necessary subprocesses to have de development server. This will launch django's development server, but also webpack in "watch" mode (so your ES6/SCSS assets are recompiled when they change) and maybe some more processes (for example, if you enable celery, it will run both celery beat and a celery worker).

$ django-zero start


Output django-zero's library path.

$ django-zero path

Delegation commands

Most things done by the CLI requires to delegate work to subprocesses, after a bit of environment setup. Instead of running webpack, gunicorn, django-admin, daphne, celery, etc. you should prefer the delegate subcommands so you're certain the environment is correct.


One of the trickiest parts is that instead of just relying on the project's node_modules directory, we setup the environment so that Node.js will use both your project's node_modules directory but also django-zero's node_modules.

It allows to bundle javascript dependencies with the library, while giving you the freedom of depending on whatever you want and not requiring to bundle the actual javascript files into django-zero's releases.


All delegates commands allow to pass arbitrary parameters to the actual binary handler. For example, if you want to pass the --wonderfull flag to webpack, just run django-zero webpack --wonderfull.

Manage (django-admin)

$ django-zero manage ...


$ django-zero gunicorn ...

(requires gunicorn to be installed)


$ django-zero daphne ...

(requires channels and daphne to be installed)


$ django-zero celery ...

(requires celery to be installed and enabled)


$ django-zero webpack ...
Last Updated: 9/15/2018, 12:20:47 PM