Mercurial > p > roundup > code
comparison roundup/templates/extended/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.16 2001-12-01 07:17:50 richard Exp $ | 18 # $Id: dbinit.py,v 1.17 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 |
| 173 user = db.getclass('user') | 173 user = db.getclass('user') |
| 174 user.create(username="admin", password=adminpw, | 174 user.create(username="admin", password=adminpw, |
| 175 address=instance_config.ADMIN_EMAIL) | 175 address=instance_config.ADMIN_EMAIL) |
| 176 | 176 |
| 177 db.commit() | 177 db.commit() |
| 178 db.close() | |
| 179 | 178 |
| 180 # | 179 # |
| 181 # $Log: not supported by cvs2svn $ | 180 # $Log: not supported by cvs2svn $ |
| 181 # Revision 1.16 2001/12/01 07:17:50 richard | |
| 182 # . We now have basic transaction support! Information is only written to | |
| 183 # the database when the commit() method is called. Only the anydbm | |
| 184 # backend is modified in this way - neither of the bsddb backends have been. | |
| 185 # The mail, admin and cgi interfaces all use commit (except the admin tool | |
| 186 # doesn't have a commit command, so interactive users can't commit...) | |
| 187 # . Fixed login/registration forwarding the user to the right page (or not, | |
| 188 # on a failure) | |
| 189 # | |
| 182 # Revision 1.15 2001/11/26 22:55:56 richard | 190 # Revision 1.15 2001/11/26 22:55:56 richard |
| 183 # Feature: | 191 # Feature: |
| 184 # . Added INSTANCE_NAME to configuration - used in web and email to identify | 192 # . Added INSTANCE_NAME to configuration - used in web and email to identify |
| 185 # the instance. | 193 # the instance. |
| 186 # . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup | 194 # . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup |
