Mercurial > p > roundup > code
comparison roundup/init.py @ 858:2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sun, 14 Jul 2002 02:05:54 +0000 |
| parents | 7e093cbaaa98 |
| children | fb8a8eb55aac |
comparison
equal
deleted
inserted
replaced
| 857:6dd691e37aa8 | 858:2dd862af72ee |
|---|---|
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # $Id: init.py,v 1.19 2002-05-23 01:14:20 richard Exp $ | 18 # $Id: init.py,v 1.20 2002-07-14 02:05:53 richard Exp $ |
| 19 | 19 |
| 20 __doc__ = """ | 20 __doc__ = """ |
| 21 Init (create) a roundup instance. | 21 Init (create) a roundup instance. |
| 22 """ | 22 """ |
| 23 | 23 |
| 96 | 96 |
| 97 roundup.templatebuilder.installHtmlBase(template_name, instance_home) | 97 roundup.templatebuilder.installHtmlBase(template_name, instance_home) |
| 98 | 98 |
| 99 # now select database | 99 # now select database |
| 100 db = '''# WARNING: DO NOT EDIT THIS FILE!!! | 100 db = '''# WARNING: DO NOT EDIT THIS FILE!!! |
| 101 from roundup.backends.back_%s import Database'''%backend | 101 from roundup.backends.back_%s import Database, Class, FileClass, IssueClass |
| 102 '''%backend | |
| 102 open(os.path.join(instance_home, 'select_db.py'), 'w').write(db) | 103 open(os.path.join(instance_home, 'select_db.py'), 'w').write(db) |
| 103 | 104 |
| 104 | 105 |
| 105 def initialise(instance_home, adminpw): | 106 def initialise(instance_home, adminpw): |
| 106 '''Initialise an instance's database | 107 '''Initialise an instance's database |
| 111 instance = roundup.instance.open(instance_home) | 112 instance = roundup.instance.open(instance_home) |
| 112 instance.init(password.Password(adminpw)) | 113 instance.init(password.Password(adminpw)) |
| 113 | 114 |
| 114 # | 115 # |
| 115 # $Log: not supported by cvs2svn $ | 116 # $Log: not supported by cvs2svn $ |
| 117 # Revision 1.19 2002/05/23 01:14:20 richard | |
| 118 # . split instance initialisation into two steps, allowing config changes | |
| 119 # before the database is initialised. | |
| 120 # | |
| 116 # Revision 1.18 2001/11/22 15:46:42 jhermann | 121 # Revision 1.18 2001/11/22 15:46:42 jhermann |
| 117 # Added module docstrings to all modules. | 122 # Added module docstrings to all modules. |
| 118 # | 123 # |
| 119 # Revision 1.17 2001/11/12 23:17:38 jhermann | 124 # Revision 1.17 2001/11/12 23:17:38 jhermann |
| 120 # Code using copyDigestedFile() that passes unit tests | 125 # Code using copyDigestedFile() that passes unit tests |
