Commits

Denis Darii committed d5cc611 Draft

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

Comments (0)

Files changed (3)

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

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

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:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.