Source

microdjango /

Filename Size Date modified Message
1008 B
368 B

MicroDjango

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.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.