Version 2 (modified by anonymous, 19 years ago) ( diff )

--

Don't know why the sh wiki processor ain't workin, so to view the script, edit this page.

#!/bin/bash

DJANGO_PROJECT="$(basename `pwd`)"
#SERVER_ADDR="10.1.0.1"
#SERVER_PORT="8000"

DJANGO_DB_NAME="${DJANGO_PROJECT}"
DJANGO_DB_USER=''
DJANGO_DB_PASS=''

DJANGO_SECRET_UNIQUE_ID='YOUR_SECRET_UNIQUE_ID_HERE'



PYTHONPATH="$(echo $PYTHONPATH):$(dirname `pwd`)"

DJANGO_SETTINGS_MODULE="${DJANGO_PROJECT}.settings"

if [ "$1" == "-S" ]; then
    if [ -z "${SERVER_ADDR}" ]; then
        SERVER_ADDR="localhost"
    fi
    if [ -z "${SERVER_PORT}" ]; then
        SERVER_PORT="8000"
    fi
    django-admin.py runserver ${SERVER_ADDR}:${SERVER_PORT} \
        --settings="${DJANGO_PROJECT}.settings"
fi
Note: See TracWiki for help on using the wiki.
Back to Top