Mercurial > p > roundup > code
comparison roundup/templates/classic/dbinit.py @ 872:bd6211d39328
Saving, running & editing queries.
| author | Gordon B. McMillan <gmcm@users.sourceforge.net> |
|---|---|
| date | Wed, 17 Jul 2002 12:39:11 +0000 |
| parents | 2dd862af72ee |
| children | 502a5ae11cc5 |
comparison
equal
deleted
inserted
replaced
| 871:a4ab8fdf83a2 | 872:bd6211d39328 |
|---|---|
| 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.19 2002-07-14 02:05:54 richard Exp $ | 18 # $Id: dbinit.py,v 1.20 2002-07-17 12:39:10 gmcm Exp $ |
| 19 | 19 |
| 20 import os | 20 import os |
| 21 | 21 |
| 22 import instance_config | 22 import instance_config |
| 23 from select_db import Database, Class, FileClass, IssueClass | 23 from select_db import Database, Class, FileClass, IssueClass |
| 48 stat.setkey("name") | 48 stat.setkey("name") |
| 49 | 49 |
| 50 keyword = Class(db, "keyword", | 50 keyword = Class(db, "keyword", |
| 51 name=String()) | 51 name=String()) |
| 52 keyword.setkey("name") | 52 keyword.setkey("name") |
| 53 | 53 |
| 54 query = Class(db, "query", | |
| 55 klass=String(), name=String(), | |
| 56 url=String()) | |
| 57 query.setkey("name") | |
| 58 | |
| 54 user = Class(db, "user", | 59 user = Class(db, "user", |
| 55 username=String(), password=Password(), | 60 username=String(), password=Password(), |
| 56 address=String(), realname=String(), | 61 address=String(), realname=String(), |
| 57 phone=String(), organisation=String(), | 62 phone=String(), organisation=String(), |
| 58 alternate_addresses=String()) | 63 alternate_addresses=String(), queries=Multilink("query")) |
| 59 user.setkey("username") | 64 user.setkey("username") |
| 60 | 65 |
| 61 # FileClass automatically gets these properties: | 66 # FileClass automatically gets these properties: |
| 62 # content = String() [saved to disk in <instance home>/db/files/] | 67 # content = String() [saved to disk in <instance home>/db/files/] |
| 63 # (it also gets the Class properties creation, activity and creator) | 68 # (it also gets the Class properties creation, activity and creator) |
| 124 address=instance_config.ADMIN_EMAIL) | 129 address=instance_config.ADMIN_EMAIL) |
| 125 db.commit() | 130 db.commit() |
| 126 | 131 |
| 127 # | 132 # |
| 128 # $Log: not supported by cvs2svn $ | 133 # $Log: not supported by cvs2svn $ |
| 134 # Revision 1.19 2002/07/14 02:05:54 richard | |
| 135 # . all storage-specific code (ie. backend) is now implemented by the backends | |
| 136 # | |
| 129 # Revision 1.18 2002/07/09 03:02:53 richard | 137 # Revision 1.18 2002/07/09 03:02:53 richard |
| 130 # More indexer work: | 138 # More indexer work: |
| 131 # - all String properties may now be indexed too. Currently there's a bit of | 139 # - 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 | 140 # "issue" specific code in the actual searching which needs to be |
| 133 # addressed. In a nutshell: | 141 # addressed. In a nutshell: |
