# HG changeset patch # User ymh # Date 1392744695 0 # Node ID 9e403b05797b2dd06229dbda8625d47b2944f8b2 # Parent 9be5aaedfe6a16ab324b971a17647a211a69328e refine buildout config and add buildout config for wsgi server diff -r 9be5aaedfe6a -r 9e403b05797b buildout-prod.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildout-prod.cfg Tue Feb 18 17:31:35 2014 +0000 @@ -0,0 +1,11 @@ +[buildout] +extends = buildout.cfg +parts += gunicorn + +[gunicorn] +recipe = zc.recipe.egg:scripts +dependent-scripts = true +eggs = + ${python:eggs} + eventlet + gunicorn diff -r 9be5aaedfe6a -r 9e403b05797b buildout.cfg --- a/buildout.cfg Wed Jan 22 16:56:18 2014 +0100 +++ b/buildout.cfg Tue Feb 18 17:31:35 2014 +0000 @@ -5,9 +5,7 @@ django python django-extensions -# django-piston - magic - utidylib + utidylib omelette unzip = true develop = . @@ -20,7 +18,6 @@ recipe = zc.recipe.egg interpreter = python eggs = ${django:eggs} -extra-paths = ${magic:location} [django] recipe = djangorecipe @@ -34,7 +31,6 @@ src/cm extras ${django-extensions:location} - ${magic:location} eggs = django-flash django-tagging @@ -43,7 +39,7 @@ # django-css chardet feedparser - PIL + Pillow BeautifulSoup html5lib pytz @@ -52,6 +48,7 @@ south psycopg2 utidylib + cssutils [django-extensions] recipe=zerokspot.recipe.git @@ -59,11 +56,6 @@ #rev=7c73978b55fcadbe2cd6f2abbefbedb5a85c2c8c -[magic] -recipe=hexagonit.recipe.download -url=http://www.jsnp.net/code/magic.py -download-only=true - [utidylib] recipe = zc.recipe.egg eggs = uTidylib @@ -72,3 +64,4 @@ [omelette] recipe = collective.recipe.omelette eggs = ${django:eggs} + diff -r 9be5aaedfe6a -r 9e403b05797b src/cm/wsgi.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cm/wsgi.py Tue Feb 18 17:31:35 2014 +0000 @@ -0,0 +1,11 @@ +import os +import sys + +os.environ['DJANGO_SETTINGS_MODULE'] = 'cm.settings' + +path = environ['PROJECT_PATH'] +if path not in sys.path: + sys.path.append(path) + +import django.core.handlers.wsgi +app = django.core.handlers.wsgi.WSGIHandler()