microdjango /

Filename Size Date modified Message
1.0 KB
387 B


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 microdjango.py to your current directory, install django, and run:

PYTHONPATH=$(pwd) django-admin.py 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.