Development & Design Blog

Archive for August, 2009

Error Documents in TurboGears 2.0

When you quickstart a TG2 project, it will create an ErrorController for you in yourproject/controllers/error.py.

When an unhandled exception is raised in your application, and debugging is turned off, that exception goes all the way up the call stack, to the Error Middleware, which then tries to dispatch your ErrorController to display an error message to the client.

The idea is that you can set up error reporting, templates, whatever you like, for your ErrorController, to fully customize your error handling experience.

This usually works automagically, but it wasn’t working for me, so I decided to figure out how this whole process works.

(more…)

Hosting Multiple WSGI Applications with Apache

So yesterday, I was trying to run a second instance of my TG2.0 application under Apache 2. I needed a demo, hosted under another subdirectory, for a client.

Piece of cake, right?

(more…)