Jorge Vargas wrote: > Hi I just notice two things that got imported into trunk and I had to > post something. > > tg-admin and quickstart templates where the two of the most horrible > parts of the original TG. > > tg-admin grew out of the templates engine and that's why it's based on > paster and not a real commandline util. I say we need to stop that, > which brings us to the question does tg really needs a cmd tool? I > think we do but not for the core most of the old command module where > development tools and/or wrappers to other commandline tools, we need > to separate paster from the CLI and do a real CLI maybe based on the > cmd module and/or have commands be loaded from entry points but the > whole idea is too keep it simple none of this CLI tools are going to > be used by "mortal users" so they should be smart and try not to have > 100 switches noone will use.
I'm not sure what the distinction between paster and a real CLI is? The structure in paster is there to make it easier to write high-quality command line scripts in a pluggable fashion. > seconds the templates, they are horrible to code, all the branching > with SO/SA made me go dizzy, so we need a better approach to building > templates, and the problem is really with all the branching, for > example having a full project be build with optional > SO/SA/identitySO/identitySA, will mean having 4 different templates so > we really need second the size just look at > http://trac.turbogears.org/browser/trunk/tg/pastetemplates/turbogears/%2Bpackage%2B > that's almost 10 folders of stuff, stuff that is going to break > projects on updates, stuff people are never going to touch because > they may break something, do we really need ALL that stuff?? code > generation is sometimes the way to go but I'm starting to think here > it's a bad idea. specially with all those instances with the name of > the package, it makes it a pain to upgrade when the templates from > which you started changes. Can you just have multiple templates, like turbogears_sqlobject and turbogears_sqlalchemy? They can both depend on a base turbogears template, and just add their specific items. You can also raise paste.script.copydir.SkipTemplate in a template to skip a file completely. The function skip_template(condition) that is available by default allows you to do this. You can use this to provide full files that are skipped or included based on something. E.g., skip_template(model!='SQLAlchemy') in a SQLAlchemy-based file. -- Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org | Write code, do good | http://topp.openplans.org/careers --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
