Skip to main content

Serve static files and django templates in current folder, for prototyping

Project description

This is a command line utility that django-izes the current folder. This is primarily for prototyping.

Lets say the current folder contains a bunch of html file, this utility runs a django server, and makes the files available through it. The html files can use django’s powerfull template inheritance.

If there is a folder named static in current folder, that content of that folder will also become available on /static/ url.

This utility maps request to /favicon.ico to /static/favicon.ico.

Also if there is a ajax.yaml file in current folder, this utility will look for request the requested path in the yaml file, and if it exists, appropriate JSON will be returned.

Further if file names or exist, the utility “imports” them, and if those files use importd style “decorated” views or forms, they too become available (example).

Take a look at an example folder, and compare it with the test suite.

Installation and Usage

To install:

$ pip install djangothis

To run from any folder that contains files as described above:

$ djangothis
Validating models...

0 errors found
Django version 1.4.1, using settings None
Development server is running at
Quit the server with CONTROL-C.

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 djangothis, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size djangothis-0.1.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View
Filename, size (7.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