Mercurial > p > roundup > code
diff roundup/templates/classic/dbinit.py @ 480:a5cd27d33516 config-0-4-0-branch
Initial ConfigParser implementation.
| author | Titus Brown <titus@users.sourceforge.net> |
|---|---|
| date | Thu, 03 Jan 2002 02:12:05 +0000 |
| parents | a1a44636bace |
| children | c242455d9b46 |
line wrap: on
line diff
--- a/roundup/templates/classic/dbinit.py Thu Jan 03 02:12:05 2002 +0000 +++ b/roundup/templates/classic/dbinit.py Thu Jan 03 02:12:05 2002 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: dbinit.py,v 1.13 2002-01-02 02:31:38 richard Exp $ +# $Id: dbinit.py,v 1.13.2.1 2002-01-03 02:12:05 titus Exp $ import os @@ -51,7 +51,7 @@ from roundup.hyperdb import String, Password, Date, Link, Multilink # open the database - db = Database(instance_config.DATABASE, name) + db = Database(instance_config.get_default_database_dir(), name) # Now initialise the schema. Must do this each time. pri = Class(db, "priority", @@ -97,7 +97,7 @@ Open the new database, and set up a bunch of attributes. ''' - dbdir = os.path.join(instance_config.DATABASE, 'files') + dbdir = os.path.join(instance_config.get_default_database_dir(), 'files') if not os.path.isdir(dbdir): os.makedirs(dbdir) @@ -123,11 +123,26 @@ user = db.getclass('user') user.create(username="admin", password=adminpw, - address=instance_config.ADMIN_EMAIL) + address=instance_config.get_default_admin_email()) db.commit() # # $Log: not supported by cvs2svn $ +# Revision 1.13 2002/01/02 02:31:38 richard +# Sorry for the huge checkin message - I was only intending to implement #496356 +# but I found a number of places where things had been broken by transactions: +# . modified ROUNDUPDBSENDMAILDEBUG to be SENDMAILDEBUG and hold a filename +# for _all_ roundup-generated smtp messages to be sent to. +# . the transaction cache had broken the roundupdb.Class set() reactors +# . newly-created author users in the mailgw weren't being committed to the db +# +# Stuff that made it into CHANGES.txt (ie. the stuff I was actually working +# on when I found that stuff :): +# . #496356 ] Use threading in messages +# . detectors were being registered multiple times +# . added tests for mailgw +# . much better attaching of erroneous messages in the mail gateway +# # Revision 1.12 2001/12/02 05:06:16 richard # . We now use weakrefs in the Classes to keep the database reference, so # the close() method on the database is no longer needed.
