I solved the problem.
I have in my installation two entry_points.txt files:
1) myproject.egg-info/entry_points.txt and
2) .../TurboGears-1.1.1-py2.6.egg/EGG-INFO/entry_points.txt
I don't know why in development mode TG reads data from the first file,
while in production mode it gets data from the second one.
I don't know if there's a better way to solve this problem. I changed
both files and now it works.
thanks any way.
j
jose soares wrote:
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
--
Jose Soares
Sferacarta Net
Via Bazzanese 69
40033 Casalecchio di Reno
Bologna - Italy
Ph +39051591054
fax +390516131537
web:www.sferacarta.com
Le informazioni contenute nella presente mail ed in ogni eventuale file
allegato sono riservate e, comunque, destinate esclusivamente alla persona o
ente sopraindicati, ai sensi del decreto legislativo 30 giugno 2003, n. 196. La
diffusione, distribuzione e/o copiatura della mail trasmessa, da parte di
qualsiasi soggetto diverso dal destinatario, sono vietate. La correttezza,
l’integrità e la sicurezza della presente mail non possono essere garantite. Se
avete ricevuto questa mail per errore, Vi preghiamo di contattarci
immediatamente e di eliminarla. Grazie.
This communication is intended only for use by the addressee, pursuant to
legislative decree 30 June 2003, n. 196. It may contain confidential or
privileged information. You should not copy or use it to disclose its contents
to any other person. Transmission cannot be guaranteed to be error-free,
complete and secure. If you are not the intended recipient and receive this
communication unintentionally, please inform us immediately and then delete
this message from your system. Thank you.
--
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.