Yannick Gingras wrote: > Hi, > I'm about to release a Pylons based wiki. Among other things, it > needs 5 UUIDs in the .ini. For most new sites, those can be auto > generated and this is exactly what I'd like `paster make-config` to do. > I know that I can package a config file template as > paste_deploy_config.ini_tmpl but what I really want to do is to hack > this file at generation time. > > I looked at the doc but I see nothing about that. Is is possible to > plug hooks into `paster make-config`? > > While I'm at it, is it possible to interact with the user while > generating the config? Like asking him the name of the site and most > non-optional questions. He'll be free to edit the .ini for non mission > critical options.
For make-config (and setup-app) it'll look up an installer class. Lots of people use the Pylons default class, or paste.script.appinstall.Installer, which is also pretty generic. You can subclass this class yourself, then point the paste.app_install entry point at the class you write. Probably you'll want to subclass the config_content method. You can do interactive stuff from within that class; the command argument is a paste.config.command.Command instance, and you can use the challenge and ask methods there. -- Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org : Write code, do good : http://topp.openplans.org/careers _______________________________________________ Paste-users mailing list [email protected] http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users
