#2240: Improve the config system of TG2
------------------------+---------------------------------------------------
Reporter: chrisz | Owner:
Type: defect | Status: new
Priority: high | Milestone: __unclassified__
Component: TurboGears | Version: 2.0b6
Severity: major | Resolution:
Keywords: config |
------------------------+---------------------------------------------------
Comment (by Gustavo):
I'm -10 on this: I think switching to !PasteDeploy config files was a wise
move because it makes things much more extensible, with its application
factories, filters, etc. Also, what about "paster serve"? We'll have to
create our own !PasteScript replacement just to use a different,
incompatible config file format.
Also, I can't see anything stopping you from doing what you want to do:
Just define an application-specific configuration file in XML, !ConfigObj
file, or whatever format you want. Then in development.ini or
deployment.ini, add:
{{{
[app:main]
# (...)
my_app_config = %(here)s/foobar.cfg
}}}
Finally, from ''{yourapp}.config.middleware:make_application'', do:
{{{
parsed_config = parse_it(app_conf['my_app_config'])
}}}
This way you'd end up with the standard settings in
development/deployment.ini, while your application-specific settings will
be in the format you like (in settings.xml, settings.ini or settings.cfg,
for example).
We may even add this functionality by default, because I think it's pretty
common and more convenient.
Finally, I agree that we have to move some settings out of ''app_cfg.py'',
like those related to authentication, identification and authorization.
--
Ticket URL: <http://trac.turbogears.org/ticket/2240#comment:1>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---