Mercurial > p > roundup > code
comparison roundup/init.py @ 937:fb8a8eb55aac
cleanup: moved templatebuilder into templates.builder
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 16 Aug 2002 04:25:03 +0000 |
| parents | 2dd862af72ee |
| children | cf72eae57a2c |
comparison
equal
deleted
inserted
replaced
| 936:57d09949380e | 937:fb8a8eb55aac |
|---|---|
| 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.20 2002-07-14 02:05:53 richard Exp $ | 18 # $Id: init.py,v 1.21 2002-08-16 04:25:03 richard Exp $ |
| 19 | 19 |
| 20 __doc__ = """ | 20 __doc__ = """ |
| 21 Init (create) a roundup instance. | 21 Init (create) a roundup instance. |
| 22 """ | 22 """ |
| 23 | 23 |
| 85 | 85 |
| 86 The html directory is typically extracted from the htmlbase module in | 86 The html directory is typically extracted from the htmlbase module in |
| 87 the template. | 87 the template. |
| 88 ''' | 88 ''' |
| 89 # first, copy the template dir over | 89 # first, copy the template dir over |
| 90 import roundup.templatebuilder | 90 from roundup.templates import builder |
| 91 | 91 |
| 92 template_dir = os.path.split(__file__)[0] | 92 template_dir = os.path.split(__file__)[0] |
| 93 template_name = template | 93 template_name = template |
| 94 template = os.path.join(template_dir, 'templates', template) | 94 template = os.path.join(template_dir, 'templates', template) |
| 95 copytree(template, instance_home) | 95 copytree(template, instance_home) |
| 96 | 96 |
| 97 roundup.templatebuilder.installHtmlBase(template_name, instance_home) | 97 builder.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, Class, FileClass, IssueClass | 101 from roundup.backends.back_%s import Database, Class, FileClass, IssueClass |
| 102 '''%backend | 102 '''%backend |
| 112 instance = roundup.instance.open(instance_home) | 112 instance = roundup.instance.open(instance_home) |
| 113 instance.init(password.Password(adminpw)) | 113 instance.init(password.Password(adminpw)) |
| 114 | 114 |
| 115 # | 115 # |
| 116 # $Log: not supported by cvs2svn $ | 116 # $Log: not supported by cvs2svn $ |
| 117 # Revision 1.20 2002/07/14 02:05:53 richard | |
| 118 # . all storage-specific code (ie. backend) is now implemented by the backends | |
| 119 # | |
| 117 # Revision 1.19 2002/05/23 01:14:20 richard | 120 # Revision 1.19 2002/05/23 01:14:20 richard |
| 118 # . split instance initialisation into two steps, allowing config changes | 121 # . split instance initialisation into two steps, allowing config changes |
| 119 # before the database is initialised. | 122 # before the database is initialised. |
| 120 # | 123 # |
| 121 # Revision 1.18 2001/11/22 15:46:42 jhermann | 124 # Revision 1.18 2001/11/22 15:46:42 jhermann |
