This is a minimal django project. Everything is contained in one file. It has all the settings you need to get a django project running (that is, one: ROOT_URLCONF). Views are associated with their URLs in a different way from normal django projects. Rather than defining all the URLs in one place, they are defined one at a time, alongside the view they control. This structure is inspired by the Route decorator mechanism used by flask and bottle.

To run this project, download to your current directory, install django, and run:

PYTHONPATH=$(pwd) runserver --settings=microdjango

For another take on a minimal django project, check out Alex Clark's django-hello project, which uses a more traditional django project layout (separate settings, urls, and views), but includes proper python packaging.