← Back to team overview

harvest-dev team mailing list archive

[Merge] lp:~dylanmccall/harvest/bug-627710 into lp:harvest

 

Dylan McCall has proposed merging lp:~dylanmccall/harvest/bug-627710 into lp:harvest.

Requested reviews:
  harvest-dev (harvest-dev)
Related bugs:
  #627710 Problems setting DEBUG in local_settings.py
  https://bugs.launchpad.net/bugs/627710


Fixes a small bug with local_settings.py and the versioning stuff that causes the current production branch to show “revision 1” instead of its appropriate version name (“beta”).
-- 
https://code.launchpad.net/~dylanmccall/harvest/bug-627710/+merge/34260
Your team harvest-dev is requested to review the proposed merge of lp:~dylanmccall/harvest/bug-627710 into lp:harvest.
=== modified file 'harvest/settings.py'
--- harvest/settings.py	2010-08-23 14:15:29 +0000
+++ harvest/settings.py	2010-08-31 23:53:40 +0000
@@ -4,7 +4,6 @@
 # Django settings for harvest project.
 
 DEBUG = True
-TEMPLATE_DEBUG = DEBUG
 STATIC_SERVE = True
 PROJECT_NAME = 'harvest'
 INTERNAL_IPS = ('127.0.0.1',) #for testing
@@ -15,14 +14,6 @@
 except ImportError:
     toolbar_available = False
 
-from common import utils
-VERSION_STRING = utils.get_harvest_version(
-                    os.path.join(PROJECT_PATH, "version"),
-                    DEBUG)
-VERSION_NAME_STRING = utils.get_harvest_version_name(
-                        os.path.join(PROJECT_PATH, "version"),
-                        DEBUG)
-
 ADMINS = ('Daniel Holbach', 'daniel.holbach@xxxxxxxxxx')
 MANAGERS = ADMINS
 
@@ -146,8 +137,22 @@
 LOGIN_URL = '/openid/login'
 LOGIN_REDIRECT_URL = '/'
 
+
 import logging
 try:
     from local_settings import *
 except ImportError:
     logging.warning("No local_settings.py were found. See INSTALL for instructions.")
+
+
+#local_settings.py can change the value of DEBUG, so we should only access it now
+TEMPLATE_DEBUG = DEBUG
+
+from common import utils
+VERSION_STRING = utils.get_harvest_version(
+                    os.path.join(PROJECT_PATH, "version"),
+                    DEBUG)
+VERSION_NAME_STRING = utils.get_harvest_version_name(
+                        os.path.join(PROJECT_PATH, "version"),
+                        DEBUG)
+


Follow ups