Turbogears2

From DreamHost
Revision as of 12:26, 6 January 2011 by Javierrod (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Turbogears2 is a full stack Python web framework, like Django. Turbogears2 is based on Pylons, unlike Turbogears 1.

Once you have installed Python#Virtualenv, just follow the automatic installation instructions[1].

You can use FastCGI to deploy your Turbogears2 application. Here's a sample .fcgi script (you will also need .htaccess):

#!/home/your-username/path/to/tg2env/bin/python

from fcgi import WSGIServer # you could also use flup etc.

from paste.deploy import loadapp
real_app = loadapp('config:/home/your-username/path/to/production.ini')

def myapp(environ, start_response):
    environ['SCRIPT_NAME'] =  # get rid of the .fcgi in urls
    return real_app(environ, start_response)

server = WSGIServer(myapp)
server.run()

It also may be possible to run Turbogears2 through Passenger WSGI.