Skip to content

Commit 474d4df

Browse files
author
Richard Jones
committed
Added documentation.
1 parent ccfa854 commit 474d4df

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

roundup/init.py

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: init.py,v 1.12 2001-08-05 07:43:52 richard Exp $
1+
# $Id: init.py,v 1.13 2001-08-06 01:20:00 richard Exp $
22

33
import os, shutil, sys, errno
44

@@ -34,7 +34,36 @@ def copytree(src, dst, symlinks=0):
3434
shutil.copy2(srcname, dstname)
3535

3636
def init(instance_home, template, backend, adminpw):
37-
''' initialise an instance using the named template
37+
'''Initialise an instance using the named template and backend.
38+
39+
instance_home - the directory to place the instance data in
40+
template - the template to use in creating the instance data
41+
backend - the database to use to store the instance data
42+
adminpw - the password for the "admin" user
43+
44+
The instance_home directory will be created using the files found in
45+
the named template (roundup.templates.<name>). A standard instance_home
46+
contains:
47+
. instance_config.py
48+
- simple configuration of things like the email address for the
49+
mail gateway, the mail domain, the mail host, ...
50+
. dbinit.py and select_db.py
51+
- defines the schema for the hyperdatabase and indicates which
52+
backend to use.
53+
. interfaces.py
54+
- defines the CGI Client and mail gateway MailGW classes that are
55+
used by roundup.cgi, roundup-server and roundup-mailgw.
56+
. __init__.py
57+
- ties together all the instance information into one interface
58+
. db/
59+
- the actual database that stores the instance's data
60+
. html/
61+
- the html templates that are used by the CGI Client
62+
. detectors/
63+
- the auditor and reactor modules for this instance
64+
65+
The html directory is typically extracted from the htmlbase module in
66+
the template.
3867
'''
3968
# first, copy the template dir over
4069
import roundup.templatebuilder
@@ -57,6 +86,10 @@ def init(instance_home, template, backend, adminpw):
5786

5887
#
5988
# $Log: not supported by cvs2svn $
89+
# Revision 1.12 2001/08/05 07:43:52 richard
90+
# Instances are now opened by a special function that generates a unique
91+
# module name for the instances on import time.
92+
#
6093
# Revision 1.11 2001/08/04 22:42:43 richard
6194
# Fixed sf.net bug #447671 - typo
6295
#

0 commit comments

Comments
 (0)