Skip to main content

CherryPy Web server for Django development.

Project description


This utility is a substitute for Django’s runserver command. It was inspired by Gunicorn’s gunicorn_django command which makes it so easy to serve Django projects without having to create extra WSGI scripts.

I chose to use CherryPy as it is pure Python (thus cross-platform) and quite efficient in its own right. It also had the functionality I desired to be able to serve static media without fuss while developing Django applications.

To be clear, this utility will automatically serve your static media (as well as admin media) without needing to modify your or maintain a development version of your settings.

To do this, it modifies your settings.MEDIA_URL and settings.ADMIN_MEDIA_PREFIX on the fly before loading Django, which is also the reason that it is not provided as a custom management command.

Requirements and Installation

Django-CherryDev requires:

  • Django
  • CherryPy 3.1 or higher
  • setuptools or preferably distribute
  • argparse (already included in Python 2.7)

Installation is as simple as pip install django-cherrydev.


You can install the latest development version from the hg repository with pip install -e hg+ or from a tarball with pip install django-cherrydev==dev.


Django-CherryDev provides a single script, cherrydev, which uses CherryPy to serve your Django project and media files. To use it, simply CD into your Django project directory and run cherrydev:

$ cd myproject
$ cherrydev


usage: cherrydev [-h] [–noreload] [-b ADDRESS] [–nomedia] [-m MEDIA_ADDR]
[–noadmin] [-a ADMIN_ADDR] [-l LINK_DIR] [SETTINGS_PATH]
positional arguments:
SETTINGS_PATH By default SETTINGS_PATH will look for in
the current directory.
optional arguments:
-h, --help show this help message and exit
--noreload Tells CherryPy to NOT use the auto-reloader.
 The socket to bind. A string of the form: ‘HOST’, ‘HOST:PORT’. An IP is a valid HOST. (default: ‘’)

By default, CherryPy will be used to serve your media. If your MEDIA_URL includes a host component, it will be changed to an alternate port on localhost. If your ADMIN_MEDIA_PREFIX includes a host component that does not match that of MEDIA_URL, it will also be changed to its own alternate port.

--nomedia Tells CherryPy to NOT host media.
 The socket to bind media. A string of the form: ‘HOST’, ‘HOST:PORT’. An IP is a valid HOST. (default: ‘’)
--noadmin Tells CherryPy to NOT host admin media.
 The socket to bind admin. A string of the form: ‘HOST’, ‘HOST:PORT’. An IP is a valid HOST. (default: ‘’)
-l LINK_DIR, --link LINK_DIR
 An additional directory to be linked to MEDIA_URL. May be used multiple times. A string of the form: ‘PATH=DIRECTORY’. (e.g. ‘app=../myapp/media’)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-cherrydev, version 0.1b
Filename, size File type Python version Upload date Hashes
Filename, size (11.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page