comparison roundup/templates/extended/dbinit.py @ 71:5147b4c51fd5

Added the Roundup spec to the new documentation directory.
author Richard Jones <richard@users.sourceforge.net>
date Wed, 25 Jul 2001 01:23:07 +0000
parents 03940dfa669e
children 0791d13baea7
comparison
equal deleted inserted replaced
70:d95a03480fd1 71:5147b4c51fd5
1 # $Id: dbinit.py,v 1.5 2001-07-23 23:20:35 richard Exp $ 1 # $Id: dbinit.py,v 1.6 2001-07-25 01:23:07 richard Exp $
2 2
3 import os 3 import os
4 4
5 import instance_config 5 import instance_config
6 from roundup import roundupdb 6 from roundup import roundupdb
23 23
24 24
25 def open(name=None): 25 def open(name=None):
26 ''' as from the roundupdb method openDB 26 ''' as from the roundupdb method openDB
27 27
28 storagelocator must be the directory the __init__.py file is in
29 - os.path.split(__file__)[0] gives us that I think
30 ''' 28 '''
31 from roundup.hyperdb import String, Date, Link, Multilink 29 from roundup.hyperdb import String, Date, Link, Multilink
32 30
33 # open the database 31 # open the database
34 db = Database(instance_config.DATABASE, name) 32 db = Database(instance_config.DATABASE, name)
94 return db 92 return db
95 93
96 def init(adminpw): 94 def init(adminpw):
97 ''' as from the roundupdb method initDB 95 ''' as from the roundupdb method initDB
98 96
99 storagelocator must be the directory the __init__.py file is in
100 - os.path.split(__file__)[0] gives us that I think
101
102 Open the new database, and set up a bunch of attributes. 97 Open the new database, and set up a bunch of attributes.
103 98
104 ''' 99 '''
105 dbdir = os.path.join(instance_config.DATABASE, 'files') 100 dbdir = os.path.join(instance_config.DATABASE, 'files')
106 if not os.path.isdir(dbdir): 101 if not os.path.isdir(dbdir):
154 149
155 db.close() 150 db.close()
156 151
157 # 152 #
158 # $Log: not supported by cvs2svn $ 153 # $Log: not supported by cvs2svn $
154 # Revision 1.5 2001/07/23 23:20:35 richard
155 # forgot to remove the interfaces from the dbinit module ;)
156 #
159 # Revision 1.4 2001/07/23 08:45:28 richard 157 # Revision 1.4 2001/07/23 08:45:28 richard
160 # ok, so now "./roundup-admin init" will ask questions in an attempt to get a 158 # ok, so now "./roundup-admin init" will ask questions in an attempt to get a
161 # workable instance_home set up :) 159 # workable instance_home set up :)
162 # _and_ anydbm has had its first test :) 160 # _and_ anydbm has had its first test :)
163 # 161 #

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