Available commandsΒΆ

If everything works okay, the following shell functions are created:

  • djp (tab completion)

    Start working on a project (first argument, optional second argument is the Django project, default “www”), automatically activating the virtualenv with the name of the project and selecting settings.env.local using djenv. Virtualenv and empty project are created if they do not yet exist.

  • setproject

    Set the PROJECT_ROOT to either current or specified directory.

  • djenv (tab completion)

    switch to different settings or another Django project.

  • cdroot (tab completion)

    go to current PROJECT_ROOT.

  • cdlib (tab completion)

    go to subdirectory ‘lib’ of the current PROJECT_ROOT.

  • cdjango (tab completion)

    go to Django project root (one lower than project root).

  • djadmin (install tab completion yourself)

    shorthand for django-admin.py, which you should use instead of manage.py (unless you want to tweak things).

  • runserver

    perform django-admin.py runserver <port>, using LOCAL_SERVER_PORT if defined. Use option -p to bind to your network IP address.

  • djbrowse

    points the browser to the server listening on LOCAL_SERVER_PORT in the current settings.

  • djvirtualbrowse

    Points the browser to the named virtual host for the current settings. Assumes Apache is running as reverse proxy; see bin/create_apache_vhost_conf for more information.

  • pipup (tab completion)

    call pip install with the appropriate file listing the project’s requirements.

  • removeorphanpycs

    remove .pyc files without a corresponding .py.

  • removeemptydirs

    remove all empty directories in the project (calls removeorphanpycs first).

  • pycompile

    compile all .py files - handy for web server environments, calls removeorphanpycs afterwards.

  • get_django_setting

    get a value from the current settings module, useful for your own scripts (also see the experimental import_django_settings).

  • djexit

    leave the current Django project.

See bin/djenvlib.sh for the more information.