Author: brosner
Date: Mon Sep 22 10:43:02 2008
New Revision: 927
Added:
trunk/pinax/deploy/
trunk/pinax/deploy/pinax.wsgi
Log:
Added a working WSGI file for mod_wsgi deployment.
Added: trunk/pinax/deploy/pinax.wsgi
==============================================================================
--- (empty file)
+++ trunk/pinax/deploy/pinax.wsgi Mon Sep 22 10:43:02 2008
@@ -0,0 +1,28 @@
+
+import os
+import sys
+
+# redirect sys.stdout to sys.stderr for bad libraries like geopy that uses
+# print statements for optional import exceptions.
+sys.stdout = sys.stderr
+
+from os.path import abspath, dirname, join
+from site import addsitedir
+
+path = addsitedir(abspath(join(dirname(__file__), "../../external_libs")),
set())
+if path:
+ sys.path = list(path) + sys.path
+
+sys.path.insert(0, abspath(join(dirname(__file__), "../../external_apps")))
+sys.path.insert(0, abspath(join(dirname(__file__), "../../local_apps")))
+sys.path.insert(0, abspath(join(dirname(__file__), "../../core_apps")))
+
+# emulate manage.py path hacking.
+sys.path.insert(0, abspath(join(dirname(__file__), "../../")))
+sys.path.insert(0, abspath(join(dirname(__file__), "../")))
+
+from django.core.handlers.wsgi import WSGIHandler
+
+os.environ["DJANGO_SETTINGS_MODULE"] = "pinax.settings"
+
+application = WSGIHandler()
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---