Code

. #551483 ] assignedto in Client.make_index_link
[roundup.git] / roundup / templates / classic / dbinit.py
index 4a9e2b0eb04813a7f018ece5395ea247096eb232..ba9642a16003265aad934d6bdc4f3307e608cfa3 100644 (file)
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: dbinit.py,v 1.11 2001-12-01 07:17:50 richard Exp $
+# $Id: dbinit.py,v 1.16 2002-02-16 08:06:14 richard Exp $
 
 import os
 
@@ -35,13 +35,7 @@ class Database(roundupdb.Database, select_db.Database):
 class IssueClass(roundupdb.IssueClass):
     ''' issues need the email information
     '''
-    INSTANCE_NAME = instance_config.INSTANCE_NAME
-    ISSUE_TRACKER_WEB = instance_config.ISSUE_TRACKER_WEB
-    ISSUE_TRACKER_EMAIL = instance_config.ISSUE_TRACKER_EMAIL
-    ADMIN_EMAIL = instance_config.ADMIN_EMAIL
-    MAILHOST = instance_config.MAILHOST
-    MESSAGES_TO_AUTHOR = instance_config.MESSAGES_TO_AUTHOR
-    EMAIL_SIGNATURE_POSITION = instance_config.EMAIL_SIGNATURE_POSITION
+    pass
 
  
 def open(name=None):
@@ -51,7 +45,7 @@ def open(name=None):
     from roundup.hyperdb import String, Password, Date, Link, Multilink
 
     # open the database
-    db = Database(instance_config.DATABASE, name)
+    db = Database(instance_config, name)
 
     # Now initialise the schema. Must do this each time.
     pri = Class(db, "priority", 
@@ -69,13 +63,15 @@ def open(name=None):
     user = Class(db, "user", 
                     username=String(),   password=Password(),
                     address=String(),    realname=String(), 
-                    phone=String(),      organisation=String())
+                    phone=String(),      organisation=String(),
+                    alternate_addresses=String())
     user.setkey("username")
 
     msg = FileClass(db, "msg", 
                     author=Link("user"), recipients=Multilink("user"), 
                     date=Date(),         summary=String(), 
-                    files=Multilink("file"))
+                    files=Multilink("file"),
+                    messageid=String(),  inreplyto=String())
 
     file = FileClass(db, "file", 
                     name=String(),       type=String())
@@ -83,7 +79,6 @@ def open(name=None):
     issue = IssueClass(db, "issue", 
                     assignedto=Link("user"), topic=Multilink("keyword"),
                     priority=Link("priority"), status=Link("status"))
-    issue.setkey('title')
 
     import detectors
     detectors.init(db)
@@ -124,10 +119,60 @@ def init(adminpw):
     user.create(username="admin", password=adminpw, 
                                   address=instance_config.ADMIN_EMAIL)
     db.commit()
-    db.close()
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.15  2002/02/15 07:08:44  richard
+#  . Alternate email addresses are now available for users. See the MIGRATION
+#    file for info on how to activate the feature.
+#
+# Revision 1.14  2002/01/14 02:20:15  richard
+#  . changed all config accesses so they access either the instance or the
+#    config attriubute on the db. This means that all config is obtained from
+#    instance_config instead of the mish-mash of classes. This will make
+#    switching to a ConfigParser setup easier too, I hope.
+#
+# At a minimum, this makes migration a _little_ easier (a lot easier in the
+# 0.5.0 switch, I hope!)
+#
+# 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.
+#   I bumped the minimum python requirement up to 2.1 accordingly.
+# . #487480 ] roundup-server
+# . #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.
+#
+# Revision 1.11  2001/12/01 07:17:50  richard
+# . 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)
+#
 # Revision 1.10  2001/11/26 22:55:56  richard
 # Feature:
 #  . Added INSTANCE_NAME to configuration - used in web and email to identify