Commits

Anonymous committed e479a45

Fixed minor bugs in get_django_setting and run_in_env_wrapper.sh

  • Participants
  • Parent commits 5d2cd71

Comments (0)

Files changed (3)

 will create a ``settings/env/local.py`` with default contents for a given
 environment. Now, you only need to update ``settings.env.local`` with those
 settings you want to keep absolutely local, like those containing
-user ids and passwords. Keep in mind the script will overwrite exiting
+user ids and passwords. Keep in mind the script will overwrite existing
 ``local.py`` settings files!
 
 Directories

File bin/djenvlib

 # this to work!
 function get_django_setting() {
     _verify_project_root || return 1
-    _verify_django_settings_module || return 1
     [ -z "$1" ] && echo "Usage: get_django_setting <setting-name> [default-value] [settings-module]" 1>&2 && return 1
 
     local settings_module
     if [ ! -z "$3" ]; then
         settings_module=$3
     else
+        _verify_django_settings_module || return 1
         settings_module=$DJANGO_SETTINGS_MODULE
     fi
     python << EOF

File bin/run_in_env_wrapper.sh

 # - DJANGO_SETTINGS
 # - VIRTUAL_ENV (optional)
 
-APP_HOME=`dirname $0` # Make sure we can refer back to this location
+APP_HOME=$(cd `dirname $0`; pwd) # Make sure we can refer back to this location
 
 # Update PATH
 PATH=$APP_HOME:$PATH