Commits

Anonymous committed b8ada28

run_in_env_wrapper.sh adds lib instead of apps to PYTHON_PATH now

  • Participants
  • Parent commits 2abbe93

Comments (0)

Files changed (2)

bin/create_apache_vhost_conf.sh

          -d "$django_project_dir/settings" ]; then
         django_project=`basename $django_project_dir`
 
-        echo '#' $django_project
+        echo "#" $django_project
         export PYTHONPATH=`dirname $django_project_dir`
         export DJANGO_SETTINGS_MODULE=$django_project.settings
         port=`get_django_setting LOCAL_SERVER_PORT 8000`
                 continue
             fi
 
-            django_project_dir=`echo $settings | sed "s#/settings/env/.*py##"`
-            django_project=`basename $django_project_dir`
-            django_settings=`echo $settings | sed "s#$PROJECT_ROOT/##" | sed "s#[a-z0-9_]*/settings/env/#settings.env.#" | sed 's#.py$##'`
+            django_settings=`echo $settings | sed "s#$PROJECT_ROOT/##" | \
+                             sed "s#[a-z0-9_]*/settings/env/#settings.env.#" | sed 's#.py$##'`
             django_settings_id=`echo $django_settings | sed "s#.*\\.##"`
 
-            echo '#' $django_project $django_settings
+            echo '#' $django_project $django_settings $django_project_dir
 
             export PYTHONPATH=`dirname $django_project_dir`
             export DJANGO_SETTINGS_MODULE=$django_project.$django_settings
     fi
 done
 
-echo '# <<<' Generated django-environments virtual host config end
+echo "# <<<" Generated django-environments virtual host config end

bin/run_in_env_wrapper.sh

 # Update PATH
 PATH=$APP_HOME:$PATH
 
-# Update PYTHONPATH
-PYTHONPATH=$PROJECT_ROOT/apps:$PYTHONPATH
+# Update PYTHONPATH, add lib:
+PYTHONPATH=$PROJECT_ROOT/lib:$PYTHONPATH
 
 # Check for help request
 if [ "$1" = "-h" -o "$1" = "--help" ]; then