Commits

Denis Darii  committed d5cc611

now we export the PYTHONPATH in order to set settings option in the sh script for supervisor

  • Participants
  • Parent commits 26f1ad1

Comments (0)

Files changed (3)

File fagungis/example_fabfile.py

     env.code_root = join(env.projects_path, env.project)
     #  the path where manage.py of this project is located
     env.django_project_root = env.code_root
-    #  path to settings file of this project
-    env.django_project_settings = join(env.code_root, 'settings.py')
+    #  the Python path to a Django settings module.
+    env.django_project_settings = 'settings'
     #  django media dir
     env.django_media_path = join(env.code_root, 'media')
     #  django static dir

File fagungis/scripts/rungunicorn.sh

 set -e
 # go in your project root
 cd %(django_project_root)s
+# set PYTHONPATH to cwd
+export PYTHONPATH=`pwd`
 # activate the virtualenv
 source %(virtenv)s/bin/activate
 # start gunicorn with all options earlier declared in fabfile.py

File fagungis/tasks.py

     elif verbose:
         parameters_info.append(('Django project root', env.django_project_root))
     if 'django_project_settings' not in env or not env.django_project_settings:
-        env.django_project_settings = join(env.code_root, 'settings.py')
+        env.django_project_settings = 'settings'
     if verbose:
         parameters_info.append(('django_project_settings', env.django_project_settings))
     if 'django_media_path' not in env or not env.django_media_path: