comparison roundup/templates/classic/dbinit.py @ 431:a28a80b714f9

Eliminate database close method by using weakrefs. . We now use weakrefs in the Classes to keep the database reference, so the close() method on the database is no longer needed. I bumped the minimum python requirement up to 2.1 accordingly. . [SF#487480] roundup-server . [SF#487476] INSTALL.txt I also cleaned up the change message / post-edit stuff in the cgi client. There's now a clearly marked "TODO: append the change note" where I believe the change note should be added there. The "changes" list will obviously have to be modified to be a dict of the changes, or somesuch. More testing needed.
author Richard Jones <richard@users.sourceforge.net>
date Sun, 02 Dec 2001 05:06:16 +0000
parents 350685601f37
children a1a44636bace
comparison
equal deleted inserted replaced
430:350685601f37 431:a28a80b714f9
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: dbinit.py,v 1.11 2001-12-01 07:17:50 richard Exp $ 18 # $Id: dbinit.py,v 1.12 2001-12-02 05:06:16 richard Exp $
19 19
20 import os 20 import os
21 21
22 import instance_config 22 import instance_config
23 from roundup import roundupdb 23 from roundup import roundupdb
122 122
123 user = db.getclass('user') 123 user = db.getclass('user')
124 user.create(username="admin", password=adminpw, 124 user.create(username="admin", password=adminpw,
125 address=instance_config.ADMIN_EMAIL) 125 address=instance_config.ADMIN_EMAIL)
126 db.commit() 126 db.commit()
127 db.close()
128 127
129 # 128 #
130 # $Log: not supported by cvs2svn $ 129 # $Log: not supported by cvs2svn $
130 # Revision 1.11 2001/12/01 07:17:50 richard
131 # . We now have basic transaction support! Information is only written to
132 # the database when the commit() method is called. Only the anydbm
133 # backend is modified in this way - neither of the bsddb backends have been.
134 # The mail, admin and cgi interfaces all use commit (except the admin tool
135 # doesn't have a commit command, so interactive users can't commit...)
136 # . Fixed login/registration forwarding the user to the right page (or not,
137 # on a failure)
138 #
131 # Revision 1.10 2001/11/26 22:55:56 richard 139 # Revision 1.10 2001/11/26 22:55:56 richard
132 # Feature: 140 # Feature:
133 # . Added INSTANCE_NAME to configuration - used in web and email to identify 141 # . Added INSTANCE_NAME to configuration - used in web and email to identify
134 # the instance. 142 # the instance.
135 # . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup 143 # . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup

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