From dec5e9e5e7f0cddc11e47529072992d19065187d Mon Sep 17 00:00:00 2001 From: stefan Date: Fri, 13 Mar 2009 13:30:54 +0000 Subject: [PATCH] Allow user to choose the tracker template for demo. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4200 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/scripts/roundup_demo.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/roundup/scripts/roundup_demo.py b/roundup/scripts/roundup_demo.py index 29a5f0d..69ca9a4 100644 --- a/roundup/scripts/roundup_demo.py +++ b/roundup/scripts/roundup_demo.py @@ -2,7 +2,6 @@ # # Copyright 2004 Richard Jones (richard@mechanicalcat.net) # -# $Id: roundup_demo.py,v 1.1 2004-10-18 07:56:09 a1s Exp $ import sys @@ -10,9 +9,11 @@ from roundup import admin, configuration, demo, instance from roundup.i18n import _ DEFAULT_HOME = './demo' +DEFAULT_TEMPLATE = 'classic' def run(): home = DEFAULT_HOME + template = DEFAULT_TEMPLATE nuke = sys.argv[-1] == 'nuke' # if there is no tracker in home, force nuke try: @@ -32,9 +33,15 @@ def run(): _('Enter directory path to create demo tracker [%s]: ') % home) if not home: home = DEFAULT_HOME + templates = admin.AdminTool().listTemplates().keys() + template = raw_input( + _('Enter tracker template to use (one of (%s)) [%s]: ') % + (','.join(templates),template)) + if not template: + template = DEFAULT_TEMPLATE # install demo.install_demo(home, backend, - admin.AdminTool().listTemplates()['classic']['path']) + admin.AdminTool().listTemplates()[template]['path']) # run demo.run_demo(home) -- 2.30.2