--- a/.hgignore Sat Sep 11 01:18:03 2010 +0200
+++ b/.hgignore Sat Sep 11 01:18:28 2010 +0200
@@ -7,3 +7,6 @@
^web/franceculture/config\.py$
^web/static/media/
^sbin/virtualenv/distribute.*\.tar\.gz$
+
+syntax: regexp
+^web/franceculture/modwsgi\.wsgi$
\ No newline at end of file
--- a/.hgtags Sat Sep 11 01:18:03 2010 +0200
+++ b/.hgtags Sat Sep 11 01:18:28 2010 +0200
@@ -10,3 +10,5 @@
98798bbf6194b373d5582035439bc26b7c66daf9 V00.08
1296cc9b23d51f8090e2b593ca519ec7b877b8a2 V00.09
5442e8569ff0a98c066a759982a70bb31ce3fa07 V00.10
+433d84e3bca68f90e1c9cb3c15ae4cedaffc5425 V00.11
+cec4b9fc89972f9104b71d03c3db101eae171184 V00.12
--- a/sbin/sync/sync_ldt_platform Sat Sep 11 01:18:03 2010 +0200
+++ b/sbin/sync/sync_ldt_platform Sat Sep 11 01:18:28 2010 +0200
@@ -9,12 +9,13 @@
#text2unix ~/tmp/franceculture_V$1
if [ -d ~/tmp/franceculture_V$1 ]; then
- cat <<EOT | rsync -Cvrlz --delete --filter=". -" ~/tmp/franceculture_V$1/web/ iri@web.iri.centrepompidou.fr:/iridata/www/web/franceculture/
+ cat <<EOT | rsync -Cvrlz --delete --filter=". -" ~/tmp/franceculture_V$1/web/ iri@web.iri.centrepompidou.fr:/iridata/www/exp/franceculture/
+ core
P .htpasswd
P .htaccess
P franceculture/.htaccess
P franceculture/config.py
+P franceculture/modwsgi.wsgi
P robots.txt
P env/***
P log/***
--- a/sbin/virtualenv/create_python_env.py Sat Sep 11 01:18:03 2010 +0200
+++ b/sbin/virtualenv/create_python_env.py Sat Sep 11 01:18:28 2010 +0200
@@ -49,7 +49,7 @@
EXTRA_TEXT += " 'DJANGO' : { 'setup': 'django', 'url': 'http://www.djangoproject.com/download/1.2.1/tarball/', 'local': '"+ os.path.abspath(os.path.join(src_base,"Django-1.2.1.tar.gz"))+"'},\n"
EXTRA_TEXT += " 'DJANGO-EXTENSIONS' : { 'setup': 'django-extensions', 'url':'http://django-command-extensions.googlecode.com/files/django-extensions-0.4.1.tar.gz', 'local':'"+ os.path.abspath(os.path.join(src_base,"django-extensions-0.4.1.tar.gz"))+"' },\n"
EXTRA_TEXT += " 'DJANGO-REGISTRATION' : { 'setup': 'django-registration', 'url':'http://bitbucket.org/ubernostrum/django-registration/get/tip.tar.gz', 'local':'"+ os.path.abspath(os.path.join(src_base,"django-registration.tar.gz"))+"' },\n"
-EXTRA_TEXT += " 'LXML' : { 'setup': 'lxml', 'url': '"+ os.path.abspath(os.path.join(src_base,"lxml_2.2.7.tar.gz"))+"', 'local': '"+ os.path.abspath(os.path.join(src_base,"lxml_2.2.7.tar.gz"))+"'},\n"
+EXTRA_TEXT += " 'LXML' : { 'setup': 'lxml', 'url': '"+ os.path.abspath(os.path.join(src_base,"lxml_2.2.7.tar.gz"))+"', 'local': '"+ os.path.abspath(os.path.join(src_base,"lxml-2.2.7.tar.gz"))+"'},\n"
EXTRA_TEXT += "}\n"
EXTRA_TEXT += "import sys\n"
@@ -198,7 +198,7 @@
show_stdout=True)
if system_str == 'Linux' and 'DISTRIBUTE' not in ignore_packages:
- normal_install('DISTRIBUTE', 'pip', None, res_source_key, home_dir, tmp_dir)
+ normal_install('DISTRIBUTE', 'pip', None, None, res_source_key, home_dir, tmp_dir)
if 'PYXML' not in ignore_packages:
logger.notify("PyXML install : %s " % URLS['PYXML'][res_source_key])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web/franceculture/.htaccess.mod_python.tmpl Sat Sep 11 01:18:28 2010 +0200
@@ -0,0 +1,12 @@
+SetHandler python-program
+PythonHandler ldt.core.handlers.modpython
+SetEnv DJANGO_SETTINGS_MODULE franceculture.settings
+SetEnv PY_USE_XMLPLUS true
+PythonInterpreter franceculture
+PythonOption django.root /~ymh/franceculture/franceculture
+PythonOption virtualenv.activate_path /Users/ymh/dev/workspace/franceculture/sbin/virtualenv/env/venv/bin/activate_this.py
+PythonDebug on
+PythonPath "['/Users/ymh/Sites/franceculture'] + sys.path"
+Header set Pragma "no-cache"
+Header set Cache-Control "no-cache"
+Header set Expires "-1"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web/franceculture/.htaccess.mod_wsgi.tmpl Sat Sep 11 01:18:28 2010 +0200
@@ -0,0 +1,16 @@
+
+SetEnv DJANGO_SETTINGS_MODULE franceculture.settings
+SetEnv PY_USE_XMLPLUS true
+SetEnv PROJECT_PATH /iridata/users/wakimd/hg/franceculture/web
+SetEnv PYTHON_PATH /iridata/users/wakimd/Env/Efculture/lib/python2.6/site-packages
+
+Options ExecCGI FollowSymLinks
+SetHandler wsgi-script
+
+RewriteEngine On
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule ^(.*)$ /dev/~wakimd/franceculture/franceculture/modwsgi.wsgi/$1 [QSA,PT,L]
+
+Header set Pragma "no-cache"
+Header set Cache-Control "no-cache"
+Header set Expires "-1"
--- a/web/franceculture/.htaccess.tmpl Sat Sep 11 01:18:03 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-SetHandler python-program
-PythonHandler ldt.core.handlers.modpython
-SetEnv DJANGO_SETTINGS_MODULE franceculture.settings
-SetEnv PY_USE_XMLPLUS true
-PythonInterpreter franceculture
-PythonOption django.root /~ymh/franceculture/franceculture
-PythonOption virtualenv.activate_path /Users/ymh/dev/workspace/franceculture/sbin/virtualenv/env/venv/bin/activate_this.py
-PythonDebug on
-PythonPath "['/Users/ymh/Sites/franceculture'] + sys.path"
-Header set Pragma "no-cache"
-Header set Cache-Control "no-cache"
-Header set Expires "-1"
--- a/web/franceculture/__init__.py Sat Sep 11 01:18:03 2010 +0200
+++ b/web/franceculture/__init__.py Sat Sep 11 01:18:28 2010 +0200
@@ -1,4 +1,4 @@
-VERSION = (0,10)
+VERSION = (0,12)
VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION)))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web/ldt/core/handlers/modwsgi.py Sat Sep 11 01:18:28 2010 +0200
@@ -0,0 +1,24 @@
+import os, sys, site
+
+def application(environ, start_response):
+ os.environ['DJANGO_SETTINGS_MODULE'] = environ['DJANGO_SETTINGS_MODULE']
+ os.environ['PY_USE_XMLPLUS'] = environ['PY_USE_XMLPLUS']
+
+ prev_sys_path = list(sys.path)
+
+ sys.path.append(environ['PROJECT_PATH'])
+ site.addsitedir(environ['PYTHON_PATH'])
+
+ new_sys_path = []
+ for item in list(sys.path):
+ if item not in prev_sys_path:
+ new_sys_path.append(item)
+ sys.path.remove(item)
+ sys.path[:0] = new_sys_path
+
+ import django.core.handlers.wsgi
+
+ _application = django.core.handlers.wsgi.WSGIHandler()
+
+ return _application(environ, start_response)
+