comparison roundup/init.py @ 1467:378081f066cc

registration is now a two-step process with confirmation from the email address supplied in the registration form fixed [SF#687771] too (now handle all cases of @/:)
author Richard Jones <richard@users.sourceforge.net>
date Tue, 25 Feb 2003 10:19:32 +0000
parents db787cef1385
children 21312a7564fd
comparison
equal deleted inserted replaced
1466:0c3546479b52 1467:378081f066cc
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.24 2002-09-10 12:44:42 richard Exp $ 18 # $Id: init.py,v 1.25 2003-02-25 10:19:31 richard Exp $
19 19
20 __doc__ = """ 20 __doc__ = """
21 Init (create) a roundup instance. 21 Init (create) a roundup instance.
22 """ 22 """
23 23
35 source tree result in symbolic links in the destination tree; if 35 source tree result in symbolic links in the destination tree; if
36 it is false, the contents of the files pointed to by symbolic 36 it is false, the contents of the files pointed to by symbolic
37 links are copied. 37 links are copied.
38 38
39 This was copied from shutil.py in std lib. 39 This was copied from shutil.py in std lib.
40
41 """ 40 """
42 names = os.listdir(src) 41 names = os.listdir(src)
43 try: 42 try:
44 os.mkdir(dst) 43 os.mkdir(dst)
45 except OSError, error: 44 except OSError, error:
53 elif os.path.isdir(srcname): 52 elif os.path.isdir(srcname):
54 copytree(srcname, dstname, symlinks) 53 copytree(srcname, dstname, symlinks)
55 else: 54 else:
56 install_util.copyDigestedFile(srcname, dstname) 55 install_util.copyDigestedFile(srcname, dstname)
57 56
58 def install(instance_home, template, backend): 57 def install(instance_home, template):
59 '''Install an instance using the named template and backend. 58 '''Install an instance using the named template and backend.
60 59
61 instance_home - the directory to place the instance data in 60 instance_home - the directory to place the instance data in
62 template - the template to use in creating the instance data 61 template - the template to use in creating the instance data
63 backend - the database to use to store the instance data 62 backend - the database to use to store the instance data
95 template = os.path.join(template_dir, 'templates', template) 94 template = os.path.join(template_dir, 'templates', template)
96 copytree(template, instance_home) 95 copytree(template, instance_home)
97 96
98 builder.installHtmlBase(template_name, instance_home) 97 builder.installHtmlBase(template_name, instance_home)
99 98
99
100 def write_select_db(instance_home, backend):
101 ''' Write the file that selects the backend for the tracker
102 '''
100 # now select database 103 # now select database
101 db = '''# WARNING: DO NOT EDIT THIS FILE!!! 104 db = '''# WARNING: DO NOT EDIT THIS FILE!!!
102 from roundup.backends.back_%s import Database, Class, FileClass, IssueClass 105 from roundup.backends.back_%s import Database, Class, FileClass, IssueClass
103 '''%backend 106 '''%backend
104 open(os.path.join(instance_home, 'select_db.py'), 'w').write(db) 107 open(os.path.join(instance_home, 'select_db.py'), 'w').write(db)

Roundup Issue Tracker: http://roundup-tracker.org/