Christoph Zwerschke wrote:
Am 16.11.2011 15:32, schrieb jose soares:
I changed only server.environment="development" to
server.environment="production" in the same .cfg
and it works only if it has the string 'development'.
That's actually a CherryPy setting, There should not be much of a
difference. The main difference is that tracebacks are not displayed
and autoreload is disabled. TurboGears itself also makes only minor
changes, like not logging certain debug messages or not starting the
Bonjour service on a Mac. All this should not influence the behavior
fo the identity system so I currently have no clue.
What do you mean with "does not work"? Maybe you're just not seeing
certain debug messages? Or maybe you application itself checks the
setting in some place and does something different in production?
-- Christoph
I'll try to explain my self a little better. with some example.
sicer=my project name
in the file sicer.egg-info/entry_points.txt
I have this data:
[turbogears.identity.provider]
sqlalchemy = sicer.lib.identity:SferaSqlAlchemyIdentityProvider
in my file.cfg I have this line:
identity.provider='sqlalchemy'
then in sicer/lib/identity.py I have the Class
SferaSqlAlchemyIdentityProvider
here I have some customer code to validate identification.
I have also this into identity.py:
log =
logging.getLogger("sicer.lib.identity.SferaSqlAlchemyIdentityProvider.validate_password")
hdlr = logging.FileHandler('/tmp/mytrace.log')
....
When I use
server.environment="development"
there are messages into file /tmp/mytrace.log
when I use
server.environment="production"
there are no messages into file /tmp/mytrace.log
thus I suppose in 'production' mode turbogears doesn't use
the Class SferaSqlAlchemyIdentityProvider
j
--
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.