|
1 | 1 | #! /usr/bin/python |
2 | | -# $Id: roundup-admin,v 1.4 2001-07-29 07:01:39 richard Exp $ |
| 2 | +# $Id: roundup-admin,v 1.5 2001-07-30 00:04:48 richard Exp $ |
3 | 3 |
|
4 | 4 | import sys |
5 | 5 | if int(sys.version[0]) < 2: |
@@ -144,12 +144,24 @@ def main(): |
144 | 144 | template = backend = '' |
145 | 145 | while not instance_home: |
146 | 146 | instance_home = raw_input('Enter instance home: ').strip() |
147 | | - # TODO: list the templates |
148 | | - while not template: |
149 | | - template = raw_input('Select template: ').strip() |
150 | | - # TODO: list the backends |
151 | | - while not backend: |
152 | | - backend = raw_input('Select backend: ').strip() |
| 147 | + |
| 148 | + # select template |
| 149 | + import roundup.templates |
| 150 | + templates = roundup.templates.listTemplates() |
| 151 | + print 'Templates:', ', '.join(templates) |
| 152 | + template = '' |
| 153 | + while template not in templates: |
| 154 | + template = raw_input('Select template [classic]: ').strip() |
| 155 | + if not template: |
| 156 | + template = 'classic' |
| 157 | + |
| 158 | + import roundup.backends |
| 159 | + backends = roundup.backends.__all__ |
| 160 | + backend = '' |
| 161 | + while backend not in backends: |
| 162 | + backend = raw_input('Select backend [anydbm]: ').strip() |
| 163 | + if not backend: |
| 164 | + backend = 'anydbm' |
153 | 165 | while adminpw != confirm: |
154 | 166 | adminpw = getpass.getpass('Admin Password: ') |
155 | 167 | confirm = getpass.getpass(' Confirm: ') |
@@ -291,6 +303,9 @@ if __name__ == '__main__': |
291 | 303 |
|
292 | 304 | # |
293 | 305 | # $Log: not supported by cvs2svn $ |
| 306 | +# Revision 1.4 2001/07/29 07:01:39 richard |
| 307 | +# Added vim command to all source so that we don't get no steenkin' tabs :) |
| 308 | +# |
294 | 309 | # Revision 1.3 2001/07/23 08:45:28 richard |
295 | 310 | # ok, so now "./roundup-admin init" will ask questions in an attempt to get a |
296 | 311 | # workable instance_home set up :) |
|
0 commit comments