Hello everyone,
I've tried running a working TG 1.5 app under mod_wsgi.
When I start the application with the "start_application.py" script,
everything is peachy.
However, when I start the same application in mod_wsgi, toscawidgets is not
initialized as tool, so cherrypy throws an error:
AttributeError: 'Toolbox' object has no attribute 'toscawidgets'
So I dug around in the code and I found that the start_extension method in
toscawidgets.mods.tg is never called, although the file is imported
This is my wsgi start script (this is TG 1.5 with Cherrypy 3.1):
import sys
sys.path.append('/home/uwe/Projects/BTG1.1/bunspace')
sys.stdout = sys.stderr
import site
site.addsitedir('/home/uwe/Projects/BTG1.1/lib/python2.4/site-packages')
import os
os.environ['PYTHON_EGG_CACHE'] = '/usr/local/python2.4.5/python-eggs/'
os.environ['PATH']
=
'/home/uwe/Projects/BTG1.1/bin:/usr/local/python2.4.5/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin'
os.environ['VIRTUAL_ENV'] = '/home/uwe/Projects/BTG1.1'
os.environ['HOME'] = '/var/www'
os.environ['LANG'] = 'en_US.UTF-8'
import atexit
import threading
import cherrypy
import turbogears
turbogears.update_config(configfile="/home/uwe/Projects/BTG1.1/bs/dev.cfg",
modulename="bs.config")
turbogears.config.update({'global': {'server.environment': 'development'}})
turbogears.config.update({'global': {'autoreload.on': False}})
turbogears.config.update({'global': {'server.log_to_screen': True}})
import bs.controllers
application=cherrypy.tree.mount(bunspace.controllers.Root(),'/')
Can anyone tell me why toscawidgets isn't initialized although I have
toscawidgets.on=True
tools.toscawidgets.on=True
in the app config and the application starts fine without mod_wsgi
Thanks and happy Turkey Day
Uwe
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---