Changes between Version 2 and Version 3 of SimpleBashScriptToSetupDevelopmentEnvironment


Ignore:
Timestamp:
Dec 14, 2005, 8:52:42 PM (19 years ago)
Author:
Pedro Algarvio <ufs@…>
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SimpleBashScriptToSetupDevelopmentEnvironment

    v2 v3  
    3131fi
    3232}}}
     33{{{
     34#!/bin/bash
     35
     36DJANGO_PROJECT="$(basename `pwd`)"
     37#SERVER_ADDR="10.1.0.1"
     38#SERVER_PORT="8000"
     39
     40DJANGO_DB_NAME="${DJANGO_PROJECT}"
     41DJANGO_DB_USER=''
     42DJANGO_DB_PASS=''
     43
     44DJANGO_SECRET_UNIQUE_ID='YOUR_SECRET_UNIQUE_ID_HERE'
     45
     46
     47
     48PYTHONPATH="$(echo $PYTHONPATH):$(dirname `pwd`)"
     49
     50DJANGO_SETTINGS_MODULE="${DJANGO_PROJECT}.settings"
     51
     52if [ "$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"
     61fi
     62}}}
Back to Top