Code

modified to use localconfig.py (if it exists) and to make the
authoranthonybaxter <anthonybaxter@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 19 Jul 2001 05:46:47 +0000 (05:46 +0000)
committeranthonybaxter <anthonybaxter@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 19 Jul 2001 05:46:47 +0000 (05:46 +0000)
various options (e.g. paths) based on ROUNDUP_HOME &c.

git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@8 57a73879-2fb5-44c3-a270-3262357dd7e2

config.py

index 8dafdc899b917a0a16e9005b91b5f6f3a1bffa7e..c684e362f2a03aab3cab1c12e4b413f42a4e0ed0 100644 (file)
--- a/config.py
+++ b/config.py
@@ -1,14 +1,34 @@
+ROUNDUP_HOME=MAIL_DOMAIN=MAILHOST=None
+
+try:
+    from localconfig import *
+except ImportError:
+    localconfig = None
+
+import os
+
+# This is the root directory for roundup
+if not ROUNDUP_HOME:
+    ROUNDUP_HOME='/home/httpd/html/roundup'
+
+# The SMTP mail host that roundup will use to send mail
+if not MAILHOST:
+    MAILHOST = 'localhost'
+
+# The domain name used for email addresses.
+if not MAIL_DOMAIN:
+    MAIL_DOMAIN = 'bizarsoftware.com.au'
+
 # This is the directory that the database is going to be stored in
-DATABASE = '/home/httpd/html/roundup/db'
+DATABASE = os.path.join(ROUNDUP_HOME, 'db')
 
 # The email address that mail to roundup should go to
-ISSUE_TRACKER_EMAIL = 'issue_tracker@bizarsoftware.com.au'
+ISSUE_TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN
 
 # The email address that roundup will complain to if it runs into trouble
-ADMIN_EMAIL = "roundup-admin@bizarsoftware.com.au"
-
-# The SMTP mail host that roundup will use to send mail
-MAILHOST = 'dirk'
+ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN
 
 # Somewhere for roundup to log stuff internally sent to stdout or stderr
-LOG = '/home/httpd/html/roundup/roundup.log'
+LOG = os.path.join(ROUNDUP_HOME, 'roundup.log')
+
+del os