I checked the logs and I get this:
cherrypy.msg INFO HTTP: Traceback (most recent call last):
File "/usr/local/lib/python2.4/site-packages/CherryPy-2.2.1-
py2.4.egg/cherrypy/_cphttptools.py", line 105, in _run
self.main()
File "/usr/local/lib/python2.4/site-packages/CherryPy-2.2.1-
py2.4.egg/cherrypy/_cphttptools.py", line 254, in main
body = page_handler(*virtual_path, **self.params)
File "<string>", line 3, in login
File "/usr/local/lib/python2.4/site-packages/TurboGears-1.0.2.2-
py2.4.egg/turbogears/controllers.py", line 334, in expose
output = database.run_with_transaction(
File "<string>", line 5, in run_with_transaction
File "/usr/local/lib/python2.4/site-packages/TurboGears-1.0.2.2-
py2.4.egg/turbogears/database.py", line 303, in so_rwt
retval = func(*args, **kw)
File "<string>", line 5, in _expose
File "/usr/local/lib/python2.4/site-packages/TurboGears-1.0.2.2-
py2.4.egg/turbogears/controllers.py", line 351, in <lambda>
mapping, fragment, args, kw)))
File "/usr/local/lib/python2.4/site-packages/TurboGears-1.0.2.2-
py2.4.egg/turbogears/controllers.py", line 378, in _execute_func
output = errorhandling.try_call(func, *args, **kw)
File "/usr/local/lib/python2.4/site-packages/TurboGears-1.0.2.2-
py2.4.egg/turbogears/errorhandling.py", line 73, in try_call
return func(self, *args, **kw)
File "/home/gicnation/gicnation/gicnation/controllers.py", line 40,
in login
if not identity.current.anonymous and \
File "/usr/local/lib/python2.4/site-packages/TurboGears-1.0.2.2-
py2.4.egg/turbogears/identity/__init__.py", line 55, in __getattr__
identity= self.identity()
File "/usr/local/lib/python2.4/site-packages/TurboGears-1.0.2.2-
py2.4.egg/turbogears/identity/__init__.py", line 48, in identity
raise IdentityManagementNotEnabledException()
IdentityManagementNotEnabledException: An attempt was made to use a
facility of the TurboGears Identity Management framework but identity
management hasn't been enabled in the config file [via identity.on].
Identity is on, it works fine when ran as a standalone server. Is it
possible that when ran as a WSGI server that app.cfg isn't being
loaded?
On May 9, 12:53 pm, mthorn <[EMAIL PROTECTED]> wrote:
> When trying to run TG through WSGI with flup and lighttpd, Identity is
> failing to work.
>
> Here is my script to start an scgi server:
>
> #!/usr/bin/env python
> import pkg_resources
> import cherrypy
> import sys
>
> pkg_resources.require("TurboGears")
>
> from cherrypy._cpwsgi import wsgiApp
> from flup.server.scgi import WSGIServer
> from os.path import *
>
> if len(sys.argv) > 1:
> cherrypy.config.update(file=sys.argv[1])
> else:
> cherrypy.config.update(file=join(dirname(__file__), "prod.cfg"))
>
> from myapp.controllers import Root
>
> cherrypy.root = Root()
>
> cherrypy.server.start(initOnly=True, serverClass=None)
>
> WSGIServer(application=wsgiApp, bindAddress=('127.0.0.1', 4001)).run()
>
> The server starts and runs no problem. However Identity management
> seems to be turned off. Evidence can be seen with my welcome script:
>
> <p py:if="tg.identity.anonymous">Click <a href="${tg.url('/
> login')}">Login</a> to login</p>
> <p py:if="tg.config('identity.on',False) and 'Chat.Read' in
> tg.identity.permissions">Click <a href="${tg.url('/nation')}">Chat</a>
> to begin chatting</p>
>
> Neither login or chat shows up. Even tg.identity.anonymous is False
> when the user is not logged in at all.
>
> Has anyone else had similar problems or solutions?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---