On Wed, Feb 25, 2009 at 2:42 PM, Christoph Zwerschke <[email protected]> wrote: > > Mark Ramm schrieb: >> But I actually still think that the separation of python-style config >> from the base ini files is a good thing, and I love ConfigObj but I >> think that standard INI files work, and are well more standard >> standard. >> >> What is it about the app_cfg.py that you don't like specifically? >> You can set any dotted config file reference you want using standard >> python dictionary syntax: >> >> base_config['pylons.foo']={'some":value} > > I just don't like the uglyness of this line. A ConfigObj file looks much > nicer. I don't want to write "base_config" on every line and I don't > want to write brackets (or force the deployer to do so). It's no problem > if you have one or two of such lines, but if you have a config file with > dozens of settings, it makes a big difference. >
I have to agree with Mark here, pushing config into python and keeping plain .ini files is best. That said I do think our config Bunch should grow some of the functionality you are suggesting. > The other problem is that if I decide to move an option from app_cfg.py > to deployment.ini (because it's deployment specific), then I need to > change the notation in the config file and I also need to change my > application because this same option value (that may be a bool, int or > list) will suddenly be a raw string only that needs to be evaluated. > I think we could somehow make the values auto transform, maybe call paste's asbool, etc automagically? > It's inconvenient, error-prone and less performant if I need to evaluate > or cast config options. And I don't see any methods for this, such as > config.getint or config.getboolean that could be used in templates. > This could be very easy to add config is simply a Bunch object > And today I found that there is also a third, unrelated, problem with > the TG2 config system: It seems to be impossible to configure even the > most basic parameters of the templating engines. For instance, I want > Genshi to use an output method of 'html' instead of 'xhtml'. Things like > these were very simple in TG1: I would just set kid.outputformat='html'. > I think this isn't the fault of the config but a feature TG2 lacks. > (Correct me if I overlooked something and it's still as simple in TG2.) > > Therefore, in terms of usability, the new config system is a step back > for me. > maybe but I find it a lot more useful and clean for the code base. I think all of these are features we should grow into it. Can we make a ticket? > -- 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 -~----------~----~----~----~------~----~------~--~---
