Well, had to setup some stuff on dreamhost. Turns out that they are fairly bad on django hosting. Here is a working passenger_wsgi.py that is possibly much better than the default. Please not that you must have paste [http://pythonpaste.org/] installed for this to work correctly.
This has python2.7 locally installed in your account, with all the libraries locally. Dreamhost is quite painful, as the documentation is incomplete clearly!
import sys, os
if sys.version < “2.7″: os.execl(“/path/to/python”, “/path/to/ python”, *sys.argv)
sys.stdout = sys.stderr
sys.path.insert(0,”/path/to/Django-1.3.1″)
sys.path.insert(0,”/path/to/project”)
sys.path.append(“/path/to/project root directory”)
os.environ["DJANGO_SETTINGS_MODULE"] = “project.settings”
from paste.exceptions.errormiddleware import ErrorMiddleware
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
def testapplication(environ, start_response):
status = ’200 OK’
output = ‘Hello World! Running Python version ‘ + sys.version + ‘\n\n’
response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]
application = ErrorMiddleware(application, debug=True)
Nested comments
August 2nd, 2010 § 0 comments § permalink
Comments inside comments ! That seems to be a basic issue in PHP. Lets say i am including a php file, and i comment it out using /* */ and it super freaks out when that file has comments. Simple things that can save developer pain and i am sure it is not a difficult patch