Skip to content

Commit 754d9ae

Browse files
author
Anthony Baxter
committed
modified to use localconfig.py (if it exists)
and to make the various options (e.g. paths) based on ROUNDUP_HOME &c.
1 parent de385bf commit 754d9ae

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

config.py

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,34 @@
1+
ROUNDUP_HOME=MAIL_DOMAIN=MAILHOST=None
2+
3+
try:
4+
from localconfig import *
5+
except ImportError:
6+
localconfig = None
7+
8+
import os
9+
10+
# This is the root directory for roundup
11+
if not ROUNDUP_HOME:
12+
ROUNDUP_HOME='/home/httpd/html/roundup'
13+
14+
# The SMTP mail host that roundup will use to send mail
15+
if not MAILHOST:
16+
MAILHOST = 'localhost'
17+
18+
# The domain name used for email addresses.
19+
if not MAIL_DOMAIN:
20+
MAIL_DOMAIN = 'bizarsoftware.com.au'
21+
122
# This is the directory that the database is going to be stored in
2-
DATABASE = '/home/httpd/html/roundup/db'
23+
DATABASE = os.path.join(ROUNDUP_HOME, 'db')
324

425
# The email address that mail to roundup should go to
5-
ISSUE_TRACKER_EMAIL = 'issue_tracker@bizarsoftware.com.au'
26+
ISSUE_TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN
627

728
# The email address that roundup will complain to if it runs into trouble
8-
ADMIN_EMAIL = "[email protected]"
9-
10-
# The SMTP mail host that roundup will use to send mail
11-
MAILHOST = 'dirk'
29+
ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN
1230

1331
# Somewhere for roundup to log stuff internally sent to stdout or stderr
14-
LOG = '/home/httpd/html/roundup/roundup.log'
32+
LOG = os.path.join(ROUNDUP_HOME, 'roundup.log')
33+
34+
del os

0 commit comments

Comments
 (0)