Mercurial > p > roundup > code
comparison roundup/templates/classic/dbinit.py @ 60:e9735680d5b3
Oops - accidentally duped the keywords class
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 24 Jul 2001 01:06:43 +0000 |
| parents | 6ff85bc2dd56 |
| children | 5e71aaa87e5b |
comparison
equal
deleted
inserted
replaced
| 59:f8f5149ecd47 | 60:e9735680d5b3 |
|---|---|
| 1 # $Id: dbinit.py,v 1.1 2001-07-23 23:28:43 richard Exp $ | 1 # $Id: dbinit.py,v 1.2 2001-07-24 01:06:43 richard Exp $ |
| 2 | 2 |
| 3 import os | 3 import os |
| 4 | 4 |
| 5 import instance_config | 5 import instance_config |
| 6 from roundup import roundupdb, cgi_client, mailgw | 6 from roundup import roundupdb, cgi_client, mailgw |
| 38 | 38 |
| 39 stat = Class(db, "status", | 39 stat = Class(db, "status", |
| 40 name=String(), order=String()) | 40 name=String(), order=String()) |
| 41 stat.setkey("name") | 41 stat.setkey("name") |
| 42 | 42 |
| 43 keywords = Class(db, "keyword", | 43 keyword = Class(db, "keyword", |
| 44 name=String()) | 44 name=String()) |
| 45 keyword.setkey("name") | |
| 45 | 46 |
| 46 user = Class(db, "user", | 47 user = Class(db, "user", |
| 47 username=String(), password=String(), | 48 username=String(), password=String(), |
| 48 address=String(), realname=String(), | 49 address=String(), realname=String(), |
| 49 phone=String(), organisation=String()) | 50 phone=String(), organisation=String()) |
| 55 files=Multilink("file")) | 56 files=Multilink("file")) |
| 56 | 57 |
| 57 file = FileClass(db, "file", | 58 file = FileClass(db, "file", |
| 58 name=String(), type=String()) | 59 name=String(), type=String()) |
| 59 | 60 |
| 60 keyword = Class(db, "keyword", name=String()) | |
| 61 keyword.setkey("name") | |
| 62 | |
| 63 issue = IssueClass(db, "issue", | 61 issue = IssueClass(db, "issue", |
| 64 assignedto=Link("user"), topic=hyperdb.Multilink("keyword"), | 62 assignedto=Link("user"), topic=Multilink("keyword"), |
| 65 priority=Link("priority"), status=Link("status")) | 63 priority=Link("priority"), status=Link("status")) |
| 66 issue.setkey('title') | 64 issue.setkey('title') |
| 67 | 65 |
| 68 import detectors | 66 import detectors |
| 69 detectors.init(db) | 67 detectors.init(db) |
| 106 | 104 |
| 107 db.close() | 105 db.close() |
| 108 | 106 |
| 109 # | 107 # |
| 110 # $Log: not supported by cvs2svn $ | 108 # $Log: not supported by cvs2svn $ |
| 109 # Revision 1.1 2001/07/23 23:28:43 richard | |
| 110 # Adding the classic template | |
| 111 # | |
| 111 # Revision 1.4 2001/07/23 08:45:28 richard | 112 # Revision 1.4 2001/07/23 08:45:28 richard |
| 112 # ok, so now "./roundup-admin init" will ask questions in an attempt to get a | 113 # ok, so now "./roundup-admin init" will ask questions in an attempt to get a |
| 113 # workable instance_home set up :) | 114 # workable instance_home set up :) |
| 114 # _and_ anydbm has had its first test :) | 115 # _and_ anydbm has had its first test :) |
| 115 # | 116 # |
