Another thing that I find really, really ugly in the current config system is that if you set something to 'false' in a *.ini file, its value will be 'false' (as a string), which will be interpreted as true in a normal Python condition. So you're required to use a helper function such as 'asbool' from paste.deploy to evaluate such settings, and to change your code if you move the setting from *.cfg.py to *.ini.
I'm not sure that everybody is aware of this problem and that asbool() is used in the TG2 code in all cases where it is necessary. Any ideas how we can improve this? If we can't, this should at least be properly documented with a big caution sign. Also, asbool() should then be available as a standard template variable - you may want to check config flags in py:if directives inside Genshi templates. -- Christoph --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" 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-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
