I am establishing an improvement version of the live server on Webfaction, running Django applications inside a virtual Apache server atmosphere (running with no errors) on my small local machine - XP, running XAMPP Lite with Python 2.6 - that we can commit changes from via Git.
XAMPP is ready to go Comfortable with Python, and also the server begins perfectly with WSGI module loaded. The issue is after i set my Python pathways, they're set half in 'nix format (with /), and half in Home windows (with backslashes).
Here's the neighborhood machine Apache error, showing the corrupted python pathways:
[Fri Oct 08 14:52:53 2010] [error] [client 127.0.0.1] mod_wsgi (pid=1436): Exception occurred processing WSGI script 'C:/SERVER/Python26/Lib/site-packages/website-cms/webapps/django/dev.wsgi'. [Fri Oct 08 14:52:53 2010] [error] [client 127.0.0.1] Traceback (most recent call last): [Fri Oct 08 14:52:53 2010] [error] [client 127.0.0.1] File "C:/SERVER/Python26/Lib/site-packages/website-cms/webapps/django/lib/python2.5\\django\\core\\handlers\\wsgi.py", line 230, in __call__ [Fri Oct 08 14:52:53 2010] [error] [client 127.0.0.1] self.load_middleware() [Fri Oct 08 14:52:53 2010] [error] [client 127.0.0.1] File "C:/SERVER/Python26/Lib/site-packages/website-cms/webapps/django/lib/python2.5\\django\\core\\handlers\\base.py", line 42, in load_middleware [Fri Oct 08 14:52:53 2010] [error] [client 127.0.0.1] raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e)) [Fri Oct 08 14:52:53 2010] [error] [client 127.0.0.1] ImproperlyConfigured: Error importing middleware cms.middleware.multilingual: "No module named cms.middleware.multilingual"
And also the problem .wsgi file contents:
import os, sys sys.path.append('C:/SERVER/Python26/') sys.path.append('C:/SERVER/Python26/Lib/site-packages/website-cms/webapps/django') sys.path.append('C:/SERVER/Python26/Lib/site-packages/website-cms/webapps/django/lib/python2.5') from django.core.handlers.wsgi import WSGIHandler #Add the path to Django itself os.environ['DJANGO_SETTINGS_MODULE'] = 'website.settings' application = WSGIHandler()
The Apache httpd.conf may be the default for XAMPP (and never an online instance), using the following put into load the wsgi module
LoadModule wsgi_module modules/mod_wsgi-win32-ap22py26-3.3.so
&lifier to suggest towards the wsgi file:
WSGIScriptAlias / C:/SERVER/Python26/Lib/site-packages/website-cms/webapps/django/dev.wsgi
I understand the XAMPP server is applying Python2.6 (I am instructed to to make use of TortoiseGIT) and also the production is on 2.5 (enfordced through the hosting company), but that does not appear to become the reason - I'd still be prepared to have the ability to set the right path a minimum of!
All suggestions on obtaining the Python road to play ball welcomed!