X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=roundup%2Ftemplates%2Fextended%2Fdbinit.py;h=4d532ca0f5073dd5f8e14500e695151f961d15af;hb=1783e3150ef332c30d9ca35794c99ab1f332a214;hp=8a526e05ead8e19cd0d5ae9225a4f5254a559367;hpb=824c57a3ee781ce60bc85f3aee28ae6603e29140;p=roundup.git diff --git a/roundup/templates/extended/dbinit.py b/roundup/templates/extended/dbinit.py index 8a526e0..4d532ca 100644 --- a/roundup/templates/extended/dbinit.py +++ b/roundup/templates/extended/dbinit.py @@ -1,16 +1,15 @@ -# $Id: dbinit.py,v 1.2 2001-07-23 06:25:50 richard Exp $ +# $Id: dbinit.py,v 1.9 2001-08-02 06:38:17 richard Exp $ -import instance_config -from roundup import hyperdb, backends.bsddb, roundupdb, cgi_client, mailgw - -from roundup.roundupdb import Class, FileClass import os +import instance_config +from roundup import roundupdb +import select_db +from roundup.roundupdb import Class, FileClass -class Database(roundupdb.Database, backends.bsddb.Database): +class Database(roundupdb.Database, select_db.Database): ''' Creates a hybrid database from: - . the base Database class given in hyperdb (basic functionlity) - . the BSDDB implementation in hyperdb_bsddb + . the selected database back-end from select_db . the roundup extensions from roundupdb ''' pass @@ -18,31 +17,15 @@ class Database(roundupdb.Database, backends.bsddb.Database): class IssueClass(roundupdb.IssueClass): ''' issues need the email information ''' + 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 -class Client(cgi_client.Client): - ''' derives basic mail gateway implementation from the standard module, - with any specific extensions - ''' - TEMPLATES = instance_config.TEMPLATES - pass - -class MailGW(mailgw.MailGW): - ''' derives basic mail gateway implementation from the standard module, - with any specific extensions - ''' - ISSUE_TRACKER_EMAIL = instance_config.ISSUE_TRACKER_EMAIL - ADMIN_EMAIL = instance_config.ADMIN_EMAIL - MAILHOST = instance_config.MAILHOST - def open(name=None): ''' as from the roundupdb method openDB - storagelocator must be the directory the __init__.py file is in - - os.path.split(__file__)[0] gives us that I think ''' from roundup.hyperdb import String, Date, Link, Multilink @@ -96,13 +79,18 @@ def open(name=None): date=Date(), time=String(), performedby=Link("user"), description=String()) + support = IssueClass(db, "support", + assignedto=Link("user"), status=Link("status"), + rate=Link("rate"), source=Link("source"), + product=Link("product"), platform=Multilink("platform"), + version=String(), timelog=Multilink("timelog"), + customername=String()) + issue = IssueClass(db, "issue", assignedto=Link("user"), priority=Link("priority"), - status=Link("status"), rate=Link("rate"), - source=Link("source"), product=Link("product"), + status=Link("status"), product=Link("product"), platform=Multilink("platform"), version=String(), - timelog=Multilink("timelog"), customername=String()) - issue.setkey('title') + supportcall=Multilink("support")) import detectors detectors.init(db) @@ -112,9 +100,6 @@ def open(name=None): def init(adminpw): ''' as from the roundupdb method initDB - storagelocator must be the directory the __init__.py file is in - - os.path.split(__file__)[0] gives us that I think - Open the new database, and set up a bunch of attributes. ''' @@ -130,7 +115,6 @@ def init(adminpw): pri.create(name="bug", order="2") pri.create(name="usability", order="3") pri.create(name="feature", order="4") - pri.create(name="support", order="5") stat = db.getclass('status') stat.create(name="unread", order="1") @@ -172,6 +156,32 @@ def init(adminpw): # # $Log: not supported by cvs2svn $ +# Revision 1.8 2001/07/30 01:26:59 richard +# Big changes: +# . split off the support priority into its own class +# . added "new support, new user" to the page head +# . fixed the display options for the heading links +# +# Revision 1.7 2001/07/29 07:01:39 richard +# Added vim command to all source so that we don't get no steenkin' tabs :) +# +# Revision 1.6 2001/07/25 01:23:07 richard +# Added the Roundup spec to the new documentation directory. +# +# Revision 1.5 2001/07/23 23:20:35 richard +# forgot to remove the interfaces from the dbinit module ;) +# +# Revision 1.4 2001/07/23 08:45:28 richard +# ok, so now "./roundup-admin init" will ask questions in an attempt to get a +# workable instance_home set up :) +# _and_ anydbm has had its first test :) +# +# Revision 1.3 2001/07/23 07:14:41 richard +# Moved the database backends off into backends. +# +# Revision 1.2 2001/07/23 06:25:50 richard +# relfected the move to roundup/backends +# # Revision 1.1 2001/07/23 04:33:21 anthonybaxter # split __init__.py into 2. dbinit and instance_config. # @@ -182,5 +192,5 @@ def init(adminpw): # Final commit of Grande Splite # # - +# vim: set filetype=python ts=4 sw=4 et si