Changes between Initial Version and Version 1 of SimpleBashScriptToSetupDevelopmentEnvironment


Ignore:
Timestamp:
Dec 14, 2005, 8:50:17 PM (19 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SimpleBashScriptToSetupDevelopmentEnvironment

    v1 v1  
     1{{{
     2#!sh
     3#!/bin/bash
     4
     5DJANGO_PROJECT="$(basename `pwd`)"
     6#SERVER_ADDR="10.1.0.1"
     7#SERVER_PORT="8000"
     8
     9DJANGO_DB_NAME="${DJANGO_PROJECT}"
     10DJANGO_DB_USER=''
     11DJANGO_DB_PASS=''
     12
     13DJANGO_SECRET_UNIQUE_ID='YOUR_SECRET_UNIQUE_ID_HERE'
     14
     15
     16
     17PYTHONPATH="$(echo $PYTHONPATH):$(dirname `pwd`)"
     18
     19DJANGO_SETTINGS_MODULE="${DJANGO_PROJECT}.settings"
     20
     21if [ "$1" == "-S" ]; then
     22    if [ -z "${SERVER_ADDR}" ]; then
     23        SERVER_ADDR="localhost"
     24    fi
     25    if [ -z "${SERVER_PORT}" ]; then
     26        SERVER_PORT="8000"
     27    fi
     28    django-admin.py runserver ${SERVER_ADDR}:${SERVER_PORT} \
     29        --settings="${DJANGO_PROJECT}.settings"
     30fi
     31}}}
Back to Top