File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 22#
33# Copyright 2004 Richard Jones (richard@mechanicalcat.net)
44#
5- # $Id: roundup_demo.py,v 1.1 2004-10-18 07:56:09 a1s Exp $
65
76import sys
87
98from roundup import admin , configuration , demo , instance
109from roundup .i18n import _
1110
1211DEFAULT_HOME = './demo'
12+ DEFAULT_TEMPLATE = 'classic'
1313
1414def run ():
1515 home = DEFAULT_HOME
16+ template = DEFAULT_TEMPLATE
1617 nuke = sys .argv [- 1 ] == 'nuke'
1718 # if there is no tracker in home, force nuke
1819 try :
@@ -32,9 +33,15 @@ def run():
3233 _ ('Enter directory path to create demo tracker [%s]: ' ) % home )
3334 if not home :
3435 home = DEFAULT_HOME
36+ templates = admin .AdminTool ().listTemplates ().keys ()
37+ template = raw_input (
38+ _ ('Enter tracker template to use (one of (%s)) [%s]: ' ) %
39+ (',' .join (templates ),template ))
40+ if not template :
41+ template = DEFAULT_TEMPLATE
3542 # install
3643 demo .install_demo (home , backend ,
37- admin .AdminTool ().listTemplates ()['classic' ]['path' ])
44+ admin .AdminTool ().listTemplates ()[template ]['path' ])
3845 # run
3946 demo .run_demo (home )
4047
You can’t perform that action at this time.
0 commit comments