Mercurial > p > roundup > code
comparison roundup/templates/extended/dbinit.py @ 430:350685601f37
Database transactions.
. We now have basic transaction support! Information is only written to
the database when the commit() method is called. Only the anydbm
backend is modified in this way - neither of the bsddb backends have been.
The mail, admin and cgi interfaces all use commit (except the admin tool
doesn't have a commit command, so interactive users can't commit...)
. Fixed login/registration forwarding the user to the right page (or not,
on a failure)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sat, 01 Dec 2001 07:17:50 +0000 |
| parents | a6088556e9ba |
| children | a28a80b714f9 |
comparison
equal
deleted
inserted
replaced
| 429:fbfca7448422 | 430:350685601f37 |
|---|---|
| 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.15 2001-11-26 22:55:56 richard Exp $ | 18 # $Id: dbinit.py,v 1.16 2001-12-01 07:17:50 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 |
| 172 | 172 |
| 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.close() | 178 db.close() |
| 178 | 179 |
| 179 # | 180 # |
| 180 # $Log: not supported by cvs2svn $ | 181 # $Log: not supported by cvs2svn $ |
| 182 # Revision 1.15 2001/11/26 22:55:56 richard | |
| 183 # Feature: | |
| 184 # . Added INSTANCE_NAME to configuration - used in web and email to identify | |
| 185 # the instance. | |
| 186 # . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup | |
| 187 # signature info in e-mails. | |
| 188 # . Some more flexibility in the mail gateway and more error handling. | |
| 189 # . Login now takes you to the page you back to the were denied access to. | |
| 190 # | |
| 191 # Fixed: | |
| 192 # . Lots of bugs, thanks Roché and others on the devel mailing list! | |
| 193 # | |
| 181 # Revision 1.14 2001/11/21 02:34:18 richard | 194 # Revision 1.14 2001/11/21 02:34:18 richard |
| 182 # Added a target version field to the extended issue schema | 195 # Added a target version field to the extended issue schema |
| 183 # | 196 # |
| 184 # Revision 1.13 2001/10/30 00:54:45 richard | 197 # Revision 1.13 2001/10/30 00:54:45 richard |
| 185 # Features: | 198 # Features: |
