Code

. stripping of the email message body can now be controlled through
[roundup.git] / roundup / templates / extended / instance_config.py
1 #
2 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
3 # This module is free software, and you may redistribute it and/or modify
4 # under the same terms as Python, so long as this copyright message and
5 # disclaimer are retained in their original form.
6 #
7 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR
8 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
9 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
10 # POSSIBILITY OF SUCH DAMAGE.
11 #
12 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
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"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17
18 # $Id: instance_config.py,v 1.14 2002-04-23 15:46:49 rochecompaan Exp $
20 MAIL_DOMAIN=MAILHOST=HTTP_HOST=None
21 HTTP_PORT=0
23 try:
24     from localconfig import *
25 except ImportError:
26     localconfig = None
28 import os
30 # roundup home is this package's directory
31 INSTANCE_HOME=os.path.split(__file__)[0]
33 # The SMTP mail host that roundup will use to send mail
34 if not MAILHOST:
35     MAILHOST = 'localhost'
37 # The domain name used for email addresses.
38 if not MAIL_DOMAIN:
39     MAIL_DOMAIN = 'fill.me.in.'
41 # the next two are only used for the standalone HTTP server.
42 if not HTTP_HOST:
43     HTTP_HOST = ''
44 if not HTTP_PORT:
45     HTTP_PORT = 9080
47 # This is the directory that the database is going to be stored in
48 DATABASE = os.path.join(INSTANCE_HOME, 'db')
50 # This is the directory that the HTML templates reside in
51 TEMPLATES = os.path.join(INSTANCE_HOME, 'html')
53 # A descriptive name for your roundup instance
54 INSTANCE_NAME = 'Roundup issue tracker'
56 # The email address that mail to roundup should go to
57 ISSUE_TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN
59 # The web address that the instance is viewable at
60 ISSUE_TRACKER_WEB = 'http://some.useful.url/'
62 # The email address that roundup will complain to if it runs into trouble
63 ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN
65 # Somewhere for roundup to log stuff internally sent to stdout or stderr
66 LOG = os.path.join(INSTANCE_HOME, 'roundup.log')
68 # Where to place the web filtering HTML on the index page
69 FILTER_POSITION = 'bottom'      # one of 'top', 'bottom', 'top and bottom'
71 # Deny or allow anonymous access to the web interface
72 ANONYMOUS_ACCESS = 'deny'       # either 'deny' or 'allow'
74 # Deny or allow anonymous users to register through the web interface
75 ANONYMOUS_REGISTER = 'deny'     # either 'deny' or 'allow'
77 # Deny or allow anonymous users to register through the mail interface
78 ANONYMOUS_REGISTER_MAIL = 'deny'     # either 'deny' or 'allow'
80 # Send nosy messages to the author of the message
81 MESSAGES_TO_AUTHOR = 'no'       # either 'yes' or 'no'
83 # Where to place the email signature
84 EMAIL_SIGNATURE_POSITION = 'bottom'
86 # Keep email citations
87 EMAIL_KEEP_QUOTED_TEXT = 'no'
89 # Preserve the email body as is
90 EMAIL_LEAVE_BODY_UNCHANGED = 'no'
92 # Default class to use in the mailgw if one isn't supplied in email
93 # subjects. To disable, comment out the variable below or leave it blank.
94 # Examples:
95 MAIL_DEFAULT_CLASS = 'issue'   # use "issue" class by default
96 #MAIL_DEFAULT_CLASS = ''        # disable (or just comment the var out)
98 # Define what index links are available in the header, and what their
99 # labels are. Each key is used to look up one of the index specifications
100 # below - so 'DEFAULT' will use 'DEFAULT_INDEX'.
101 # Where the FILTERSPEC has 'assignedto' with a value of None, it will be
102 # replaced by the id of the logged-in user.
103 HEADER_INDEX_LINKS = ['DEFAULT', 'ALL_SUPPORT', 'UNASSIGNED_ISSUE',
104         'UNASSIGNED_SUPPORT', 'MY_ISSUE', 'MY_SUPPORT']
106 # list the classes that users are able to add nodes to
107 HEADER_ADD_LINKS = ['issue', 'support']
109 # Now the DEFAULT display specifications. TODO: describe format
110 DEFAULT_INDEX = {
111   'LABEL': 'All Issues',
112   'CLASS': 'issue',
113   'SORT': ['-activity'],
114   'GROUP': ['priority'],
115   'FILTER': ['status'],
116   'COLUMNS': ['id','activity','title','creator','assignedto'],
117   'FILTERSPEC': {
118     'status': ['-1', '1', '2', '3', '4', '5', '6', '7'],
119   },
122 ALL_SUPPORT_INDEX = {
123   'LABEL': 'All Support',
124   'CLASS': 'support',
125   'SORT': ['-activity'],
126   'GROUP': ['customername'],
127   'FILTER': ['status'],
128   'COLUMNS': ['id','activity','title','creator','assignedto'],
129   'FILTERSPEC': {
130     'status': ['-1', '1', '2', '3', '4', '5', '6', '7'],
131   },
134 # The "unsassigned issues" indexes
135 UNASSIGNED_ISSUE_INDEX = {
136   'LABEL': 'Unassigned Issues',
137   'CLASS': 'issue',
138   'SORT': ['-activity'],
139   'GROUP': ['priority'],
140   'FILTER': ['status', 'assignedto'],
141   'COLUMNS': ['id','activity','title','creator','status'],
142   'FILTERSPEC': {
143     'status': ['-1', '1', '2', '3', '4', '5', '6', '7'],
144     'assignedto': ['-1'],
145   },
147 UNASSIGNED_SUPPORT_INDEX = {
148   'LABEL': 'Unassigned Support',
149   'CLASS': 'support',
150   'SORT': ['-activity'],
151   'GROUP': ['customername'],
152   'FILTER': ['status', 'assignedto'],
153   'COLUMNS': ['id','activity','title','creator','status'],
154   'FILTERSPEC': {
155     'status': ['-1', '1', '2', '3', '4', '5', '6', '7'],
156     'assignedto': ['-1'],
157   },
160 # The "my issues" indexes -- note that the user's id will replace the None
161 # valud of the "assignedto" filterspec
162 MY_ISSUE_INDEX = {
163   'LABEL': 'My Issues',
164   'CLASS': 'issue',
165   'SORT': ['-activity'],
166   'GROUP': ['priority'],
167   'FILTER': ['status', 'assignedto'],
168   'COLUMNS': ['id','activity','title','creator','status'],
169   'FILTERSPEC': {
170     'status': ['-1', '1', '2', '3', '4', '5', '6', '7'],
171     'assignedto': None,
172   },
175 MY_SUPPORT_INDEX = {
176   'LABEL': 'My Support',
177   'CLASS': 'support',
178   'SORT': ['-activity'],
179   'GROUP': ['customername'],
180   'FILTER': ['status', 'assignedto'],
181   'COLUMNS': ['id','activity','title','creator','status'],
182   'FILTERSPEC': {
183     'status': ['-1', '1', '2', '3', '4', '5', '6', '7'],
184     'assignedto': None,
185   },
189 # $Log: not supported by cvs2svn $
190 # Revision 1.13  2002/03/14 23:59:24  richard
191 #  . #517734 ] web header customisation is obscure
193 # Revision 1.12  2002/02/15 00:13:38  richard
194 #  . #503204 ] mailgw needs a default class
195 #     - partially done - the setting of additional properties can wait for a
196 #       better configuration system.
198 # Revision 1.11  2002/02/14 23:46:02  richard
199 # . #516883 ] mail interface + ANONYMOUS_REGISTER
201 # Revision 1.10  2001/11/26 22:55:56  richard
202 # Feature:
203 #  . Added INSTANCE_NAME to configuration - used in web and email to identify
204 #    the instance.
205 #  . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup
206 #    signature info in e-mails.
207 #  . Some more flexibility in the mail gateway and more error handling.
208 #  . Login now takes you to the page you back to the were denied access to.
210 # Fixed:
211 #  . Lots of bugs, thanks Roché and others on the devel mailing list!
213 # Revision 1.9  2001/10/30 00:54:45  richard
214 # Features:
215 #  . #467129 ] Lossage when username=e-mail-address
216 #  . #473123 ] Change message generation for author
217 #  . MailGW now moves 'resolved' to 'chatting' on receiving e-mail for an issue.
219 # Revision 1.8  2001/10/23 01:00:18  richard
220 # Re-enabled login and registration access after lopping them off via
221 # disabling access for anonymous users.
222 # Major re-org of the htmltemplate code, cleaning it up significantly. Fixed
223 # a couple of bugs while I was there. Probably introduced a couple, but
224 # things seem to work OK at the moment.
226 # Revision 1.7  2001/10/22 03:25:01  richard
227 # Added configuration for:
228 #  . anonymous user access and registration (deny/allow)
229 #  . filter "widget" location on index page (top, bottom, both)
230 # Updated some documentation.
232 # Revision 1.6  2001/10/01 06:10:42  richard
233 # stop people setting up roundup with our addresses as default - need to
234 # handle this better in the init
236 # Revision 1.5  2001/08/07 00:24:43  richard
237 # stupid typo
239 # Revision 1.4  2001/08/07 00:15:51  richard
240 # Added the copyright/license notice to (nearly) all files at request of
241 # Bizar Software.
243 # Revision 1.3  2001/08/02 06:38:17  richard
244 # Roundupdb now appends "mailing list" information to its messages which
245 # include the e-mail address and web interface address. Templates may
246 # override this in their db classes to include specific information (support
247 # instructions, etc).
249 # Revision 1.2  2001/07/29 07:01:39  richard
250 # Added vim command to all source so that we don't get no steenkin' tabs :)
252 # Revision 1.1  2001/07/23 04:33:21  anthonybaxter
253 # split __init__.py into 2. dbinit and instance_config.
256 # vim: set filetype=python ts=4 sw=4 et si