Mercurial > p > roundup > code
comparison roundup/init.py @ 1591:21312a7564fd
moving templates around
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 17 Apr 2003 03:38:00 +0000 |
| parents | 378081f066cc |
| children | 1f8bbdff56b9 |
comparison
equal
deleted
inserted
replaced
| 1590:198dbefc1d5a | 1591:21312a7564fd |
|---|---|
| 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.25 2003-02-25 10:19:31 richard Exp $ | 18 # $Id: init.py,v 1.26 2003-04-17 03:37:58 richard Exp $ |
| 19 | 19 |
| 20 __doc__ = """ | 20 __doc__ = """ |
| 21 Init (create) a roundup instance. | 21 Init (create) a roundup instance. |
| 22 """ | 22 """ |
| 23 | 23 |
| 56 | 56 |
| 57 def install(instance_home, template): | 57 def install(instance_home, template): |
| 58 '''Install an instance using the named template and backend. | 58 '''Install an instance using the named template and backend. |
| 59 | 59 |
| 60 instance_home - the directory to place the instance data in | 60 instance_home - the directory to place the instance data in |
| 61 template - the template to use in creating the instance data | 61 template - the directory holding the template to use in creating |
| 62 backend - the database to use to store the instance data | 62 the instance data |
| 63 | 63 |
| 64 The instance_home directory will be created using the files found in | 64 The instance_home directory will be created using the files found in |
| 65 the named template (roundup.templates.<name>). A standard instance_home | 65 the named template (roundup.templates.<name>). A standard instance_home |
| 66 contains: | 66 contains: |
| 67 . config.py | 67 . config.py |
| 80 . html/ | 80 . html/ |
| 81 - the html templates that are used by the CGI Client | 81 - the html templates that are used by the CGI Client |
| 82 . detectors/ | 82 . detectors/ |
| 83 - the auditor and reactor modules for this instance | 83 - the auditor and reactor modules for this instance |
| 84 | 84 |
| 85 The html directory is typically extracted from the htmlbase module in | |
| 86 the template. | |
| 87 ''' | 85 ''' |
| 88 # first, copy the template dir over | 86 # At the moment, it's just a copy |
| 89 from roundup.templates import builder | |
| 90 | |
| 91 # copy the roundup.templates.<template> package contents to the instance dir | |
| 92 template_dir = os.path.split(__file__)[0] | |
| 93 template_name = template | |
| 94 template = os.path.join(template_dir, 'templates', template) | |
| 95 copytree(template, instance_home) | 87 copytree(template, instance_home) |
| 96 | |
| 97 builder.installHtmlBase(template_name, instance_home) | |
| 98 | 88 |
| 99 | 89 |
| 100 def write_select_db(instance_home, backend): | 90 def write_select_db(instance_home, backend): |
| 101 ''' Write the file that selects the backend for the tracker | 91 ''' Write the file that selects the backend for the tracker |
| 102 ''' | 92 ''' |
