Mercurial > p > roundup > code
comparison roundup/templates/classic/dbinit.py @ 858:2dd862af72ee
all storage-specific code (ie. backend) is now implemented by the backends
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sun, 14 Jul 2002 02:05:54 +0000 |
| parents | 0779ea9f1f18 |
| children | bd6211d39328 |
comparison
equal
deleted
inserted
replaced
| 857:6dd691e37aa8 | 858:2dd862af72ee |
|---|---|
| 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.18 2002-07-09 03:02:53 richard Exp $ | 18 # $Id: dbinit.py,v 1.19 2002-07-14 02:05:54 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 select_db import Database, Class, FileClass, IssueClass |
| 24 import select_db | 24 |
| 25 | |
| 26 from roundup.roundupdb import Class, FileClass | |
| 27 | |
| 28 class Database(roundupdb.Database, select_db.Database): | |
| 29 ''' Creates a hybrid database from: | |
| 30 . the selected database back-end from select_db | |
| 31 . the roundup extensions from roundupdb | |
| 32 ''' | |
| 33 pass | |
| 34 | |
| 35 class IssueClass(roundupdb.IssueClass): | |
| 36 ''' issues need the email information | |
| 37 ''' | |
| 38 pass | |
| 39 | |
| 40 | |
| 41 def open(name=None): | 25 def open(name=None): |
| 42 ''' as from the roundupdb method openDB | 26 ''' as from the roundupdb method openDB |
| 43 | |
| 44 ''' | 27 ''' |
| 45 from roundup.hyperdb import String, Password, Date, Link, Multilink | 28 from roundup.hyperdb import String, Password, Date, Link, Multilink |
| 46 | 29 |
| 47 # open the database | 30 # open the database |
| 48 db = Database(instance_config, name) | 31 db = Database(instance_config, name) |
| 141 address=instance_config.ADMIN_EMAIL) | 124 address=instance_config.ADMIN_EMAIL) |
| 142 db.commit() | 125 db.commit() |
| 143 | 126 |
| 144 # | 127 # |
| 145 # $Log: not supported by cvs2svn $ | 128 # $Log: not supported by cvs2svn $ |
| 129 # Revision 1.18 2002/07/09 03:02:53 richard | |
| 130 # More indexer work: | |
| 131 # - all String properties may now be indexed too. Currently there's a bit of | |
| 132 # "issue" specific code in the actual searching which needs to be | |
| 133 # addressed. In a nutshell: | |
| 134 # + pass 'indexme="yes"' as a String() property initialisation arg, eg: | |
| 135 # file = FileClass(db, "file", name=String(), type=String(), | |
| 136 # comment=String(indexme="yes")) | |
| 137 # + the comment will then be indexed and be searchable, with the results | |
| 138 # related back to the issue that the file is linked to | |
| 139 # - as a result of this work, the FileClass has a default MIME type that may | |
| 140 # be overridden in a subclass, or by the use of a "type" property as is | |
| 141 # done in the default templates. | |
| 142 # - the regeneration of the indexes (if necessary) is done once the schema is | |
| 143 # set up in the dbinit. | |
| 144 # | |
| 146 # Revision 1.17 2002/05/24 04:03:23 richard | 145 # Revision 1.17 2002/05/24 04:03:23 richard |
| 147 # Added commentage to the dbinit files to help people with their | 146 # Added commentage to the dbinit files to help people with their |
| 148 # customisation. | 147 # customisation. |
| 149 # | 148 # |
| 150 # Revision 1.16 2002/02/16 08:06:14 richard | 149 # Revision 1.16 2002/02/16 08:06:14 richard |
