annotate roundup/templates/extended/__init__.py @ 28:a3e119154b11

moved templates to proper location
author Anthony Baxter <anthonybaxter@users.sourceforge.net>
date Mon, 23 Jul 2001 03:50:47 +0000
parents
children 41e49de57a85
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
1 # $Id: __init__.py,v 1.1 2001-07-23 03:50:46 anthonybaxter Exp $
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
2
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
3 MAIL_DOMAIN=MAILHOST=HTTP_HOST=None
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
4 HTTP_PORT=0
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
5
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
6 try:
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
7 from localconfig import *
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
8 except ImportError:
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
9 localconfig = None
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
10
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
11 import os
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
12
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
13 # roundup home is this package's directory
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
14 ROUNDUP_HOME=os.path.split(__file__)[0]
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
15
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
16 # The SMTP mail host that roundup will use to send mail
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
17 if not MAILHOST:
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
18 MAILHOST = 'localhost'
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
19
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
20 # The domain name used for email addresses.
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
21 if not MAIL_DOMAIN:
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
22 MAIL_DOMAIN = 'bizarsoftware.com.au'
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
23
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
24 # the next two are only used for the standalone HTTP server.
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
25 if not HTTP_HOST:
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
26 HTTP_HOST = ''
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
27 if not HTTP_PORT:
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
28 HTTP_PORT = 9080
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
29
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
30 # This is the directory that the database is going to be stored in
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
31 DATABASE = os.path.join(ROUNDUP_HOME, 'db')
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
32
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
33 # This is the directory that the HTML templates reside in
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
34 TEMPLATES = os.path.join(ROUNDUP_HOME, 'templates')
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
35
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
36 # The email address that mail to roundup should go to
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
37 ISSUE_TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
38
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
39 # The email address that roundup will complain to if it runs into trouble
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
40 ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
41
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
42 # Somewhere for roundup to log stuff internally sent to stdout or stderr
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
43 LOG = os.path.join(ROUNDUP_HOME, 'roundup.log')
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
44
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
45
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
46 from roundup import hyperdb, hyper_bsddb, roundupdb, cgi_client, mailgw
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
47
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
48 class Database(roundupdb.Database, hyper_bsddb.Database):
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
49 ''' Creates a hybrid database from:
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
50 . the base Database class given in hyperdb (basic functionlity)
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
51 . the BSDDB implementation in hyperdb_bsddb
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
52 . the roundup extensions from roundupdb
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
53 '''
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
54 pass
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
55
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
56 Class = roundupdb.Class
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
57 class IssueClass(roundupdb.IssueClass):
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
58 ''' issues need the email information
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
59 '''
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
60 ISSUE_TRACKER_EMAIL = ISSUE_TRACKER_EMAIL
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
61 ADMIN_EMAIL = ADMIN_EMAIL
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
62 MAILHOST = MAILHOST
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
63
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
64 FileClass = roundupdb.FileClass
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
65
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
66 class Client(cgi_client.Client):
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
67 ''' derives basic mail gateway implementation from the standard module,
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
68 with any specific extensions
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
69 '''
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
70 TEMPLATES = TEMPLATES
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
71 pass
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
72
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
73 class MailGW(mailgw.MailGW):
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
74 ''' derives basic mail gateway implementation from the standard module,
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
75 with any specific extensions
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
76 '''
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
77 ISSUE_TRACKER_EMAIL = ISSUE_TRACKER_EMAIL
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
78 ADMIN_EMAIL = ADMIN_EMAIL
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
79 MAILHOST = MAILHOST
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
80
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
81 def open(name=None):
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
82 ''' as from the roundupdb method openDB
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
83
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
84 storagelocator must be the directory the __init__.py file is in
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
85 - os.path.split(__file__)[0] gives us that I think
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
86 '''
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
87 db = Database(DATABASE, name)
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
88 pri = Class(db, "priority", name=hyperdb.String(), order=hyperdb.String())
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
89 pri.setkey("name")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
90 stat = Class(db, "status", name=hyperdb.String(), order=hyperdb.String())
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
91 stat.setkey("name")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
92 Class(db, "keyword", name=hyperdb.String())
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
93 user = Class(db, "user", username=hyperdb.String(),
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
94 password=hyperdb.String(), address=hyperdb.String(),
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
95 realname=hyperdb.String(), phone=hyperdb.String(),
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
96 organisation=hyperdb.String())
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
97 user.setkey("username")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
98 msg = FileClass(db, "msg", author=hyperdb.Link("user"),
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
99 recipients=hyperdb.Multilink("user"), date=hyperdb.Date(),
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
100 summary=hyperdb.String(), files=hyperdb.Multilink("file"))
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
101 file = FileClass(db, "file", name=hyperdb.String(), type=hyperdb.String())
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
102
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
103 # bugs and support calls etc
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
104 rate = Class(db, "rate", name=hyperdb.String(), order=hyperdb.String())
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
105 rate.setkey("name")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
106 source = Class(db, "source", name=hyperdb.String(), order=hyperdb.String())
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
107 source.setkey("name")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
108 platform = Class(db, "platform", name=hyperdb.String(), order=hyperdb.String())
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
109 platform.setkey("name")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
110 product = Class(db, "product", name=hyperdb.String(), order=hyperdb.String())
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
111 product.setkey("name")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
112 Class(db, "timelog", date=hyperdb.Date(), time=hyperdb.String(),
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
113 performedby=hyperdb.Link("user"), description=hyperdb.String())
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
114 issue = IssueClass(db, "issue", assignedto=hyperdb.Link("user"),
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
115 priority=hyperdb.Link("priority"), status=hyperdb.Link("status"),
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
116 rate=hyperdb.Link("rate"), source=hyperdb.Link("source"),
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
117 product=hyperdb.Link("product"), platform=hyperdb.Multilink("platform"),
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
118 version=hyperdb.String(),
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
119 timelog=hyperdb.Multilink("timelog"), customername=hyperdb.String())
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
120 issue.setkey('title')
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
121 import detectors
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
122 detectors.init(db)
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
123 return db
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
124
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
125 def init(adminpw):
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
126 ''' as from the roundupdb method initDB
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
127
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
128 storagelocator must be the directory the __init__.py file is in
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
129 - os.path.split(__file__)[0] gives us that I think
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
130 '''
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
131 dbdir = os.path.join(DATABASE, 'files')
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
132 if not os.path.isdir(dbdir):
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
133 os.makedirs(dbdir)
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
134 db = open("admin")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
135 db.clear()
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
136 pri = db.getclass('priority')
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
137 pri.create(name="fatal-bug", order="1")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
138 pri.create(name="bug", order="2")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
139 pri.create(name="usability", order="3")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
140 pri.create(name="feature", order="4")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
141 pri.create(name="support", order="5")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
142
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
143 stat = db.getclass('status')
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
144 stat.create(name="unread", order="1")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
145 stat.create(name="deferred", order="2")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
146 stat.create(name="chatting", order="3")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
147 stat.create(name="need-eg", order="4")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
148 stat.create(name="in-progress", order="5")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
149 stat.create(name="testing", order="6")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
150 stat.create(name="done-cbb", order="7")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
151 stat.create(name="resolved", order="8")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
152
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
153 rate = db.getclass("rate")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
154 rate.create(name='basic', order="1")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
155 rate.create(name='premium', order="2")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
156 rate.create(name='internal', order="3")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
157
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
158 source = db.getclass("source")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
159 source.create(name='phone', order="1")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
160 source.create(name='e-mail', order="2")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
161 source.create(name='internal', order="3")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
162 source.create(name='internal-qa', order="4")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
163
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
164 platform = db.getclass("platform")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
165 platform.create(name='linux', order="1")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
166 platform.create(name='windows', order="2")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
167 platform.create(name='mac', order="3")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
168
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
169 product = db.getclass("product")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
170 product.create(name='Bizar Shop', order="1")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
171 product.create(name='Bizar Shop Developer', order="2")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
172 product.create(name='Bizar Shop Manual', order="3")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
173 product.create(name='Bizar Shop Developer Manual', order="4")
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
174
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
175 user = db.getclass('user')
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
176 user.create(username="admin", password=adminpw, address=ADMIN_EMAIL)
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
177
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
178 db.close()
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
179
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
180 #
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
181 # $Log: not supported by cvs2svn $
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
182 # Revision 1.2 2001/07/22 12:09:32 richard
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
183 # Final commit of Grande Splite
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
184 #
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
185 #
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
186
a3e119154b11 moved templates to proper location
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff changeset
187

Roundup Issue Tracker: http://roundup-tracker.org/