| 33 | {{{ |
| 34 | #!/bin/bash |
| 35 | |
| 36 | DJANGO_PROJECT="$(basename `pwd`)" |
| 37 | #SERVER_ADDR="10.1.0.1" |
| 38 | #SERVER_PORT="8000" |
| 39 | |
| 40 | DJANGO_DB_NAME="${DJANGO_PROJECT}" |
| 41 | DJANGO_DB_USER='' |
| 42 | DJANGO_DB_PASS='' |
| 43 | |
| 44 | DJANGO_SECRET_UNIQUE_ID='YOUR_SECRET_UNIQUE_ID_HERE' |
| 45 | |
| 46 | |
| 47 | |
| 48 | PYTHONPATH="$(echo $PYTHONPATH):$(dirname `pwd`)" |
| 49 | |
| 50 | DJANGO_SETTINGS_MODULE="${DJANGO_PROJECT}.settings" |
| 51 | |
| 52 | if [ "$1" == "-S" ]; then |
| 53 | if [ -z "${SERVER_ADDR}" ]; then |
| 54 | SERVER_ADDR="localhost" |
| 55 | fi |
| 56 | if [ -z "${SERVER_PORT}" ]; then |
| 57 | SERVER_PORT="8000" |
| 58 | fi |
| 59 | django-admin.py runserver ${SERVER_ADDR}:${SERVER_PORT} \ |
| 60 | --settings="${DJANGO_PROJECT}.settings" |
| 61 | fi |
| 62 | }}} |