So I develop an online questionnaire (and learnt to spell that word) for the online intranet in turbogears, it takes maybe a day total to have a nice sqlite database driven app that walks you through the questions, allows you to go back and forth, handles errors, themed exactly like the main intranet (drupal) really nice.
After developing under windows I casually copy the files to the ubuntu intranet server and try installing it in a virtual path under the root domain (e.g. intranet.com/subdirectory). Then I mess around for hours because the mod_python support for cherrypy appears to be hacked on, the support for mapping applications to virtual paths in turbogears using servo.webpath is broken and cherrypy support for virtual paths boils down to this hack which it states is buggy but doesn't say what the bugs are! The main bug I see is that IT DOESN'T MAKE ANY DIFFERENCE.
Argh.
I can get the app to work but only the index, none of the other methods in the controller are recognised.
While googling for this I came across an interesting django vs turbogears review here. He makes an interesting point: django sites survive slashdotting. I look at the cherrypy site and see where cherrypy is being used: um, sorry but these sites don't look all that impressive compared to the django equivalents.
So I'm disillusioned with cherrypy: while the raw api is clean, it looks a bit hacky and the documentation is poor ('in progress') by comparison to the other elements of the turbogears stack. I have no idea whether django supports virtual paths but it Just Worked under mod_python. Should I switch back to that, given that they are working on cleaning up their database api? I'd be tempted to stick with kid even if I went back to django, like this guy.
Dunno what to do, almost tempted to learn ruby, I'm that fed up with it all.
UPDATE: It took me a few days to figure the problem out: I had an extra .htaccess file I didn't know was there, causing mischief and interfering with whatever I did in the main config file. I've got rid of it and turbogears/ cherrypy is working fine.
The turbogears server.webpath="/subdir" does not seem to be working (as mentioned in the turbogears issue tracker) but if I hack my controllers.py file I can work around it:
class subdir: @@turbogears.expose(html="tgpcw.templates.welcome") def index(self): import time return dict(now=time.ctime()) class Root(controllers.Root): subdir = subdir()
I enabled this in the apache2 config file thusly:
<Location "/hands">
SetHandler mod_python
PythonHandler mpcp
PythonDebug On
PythonPath "['/var/www/tgpcw'] + sys.path"
PythonOption cherrysetup tgpcw_start::mp_setup
AllowOverride All
Order deny,allow
Deny from all
Allow from all
</Location>
where tgpcw is the name of my turbogears stuff.


Maybe you have already done it, anyway take a look here for TG+mod_python:
http://trac.turbogears.org/turbogears/wiki/ModPythonIntegration
Hope it can solve your problems, if you need more help please consider subscribing to to the google group and even filing a ticket on the TG trac.