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

Proposed by Dylan McCall
Status: Merged
Merged at revision: 252
Proposed branch: lp:~dylanmccall/harvest/bug-627710
Merge into: lp:harvest
Diff against target: 49 lines (+14/-9)
1 file modified
harvest/settings.py (+14/-9)
To merge this branch: bzr merge lp:~dylanmccall/harvest/bug-627710
Reviewer Review Type Date Requested Status
Daniel Holbach Approve
Review via email: mp+34260@code.launchpad.net

Description of the change

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”).

To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote :

Good work.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'harvest/settings.py'
2--- harvest/settings.py 2010-08-23 14:15:29 +0000
3+++ harvest/settings.py 2010-08-31 23:53:40 +0000
4@@ -4,7 +4,6 @@
5 # Django settings for harvest project.
6
7 DEBUG = True
8-TEMPLATE_DEBUG = DEBUG
9 STATIC_SERVE = True
10 PROJECT_NAME = 'harvest'
11 INTERNAL_IPS = ('127.0.0.1',) #for testing
12@@ -15,14 +14,6 @@
13 except ImportError:
14 toolbar_available = False
15
16-from common import utils
17-VERSION_STRING = utils.get_harvest_version(
18- os.path.join(PROJECT_PATH, "version"),
19- DEBUG)
20-VERSION_NAME_STRING = utils.get_harvest_version_name(
21- os.path.join(PROJECT_PATH, "version"),
22- DEBUG)
23-
24 ADMINS = ('Daniel Holbach', 'daniel.holbach@ubuntu.com')
25 MANAGERS = ADMINS
26
27@@ -146,8 +137,22 @@
28 LOGIN_URL = '/openid/login'
29 LOGIN_REDIRECT_URL = '/'
30
31+
32 import logging
33 try:
34 from local_settings import *
35 except ImportError:
36 logging.warning("No local_settings.py were found. See INSTALL for instructions.")
37+
38+
39+#local_settings.py can change the value of DEBUG, so we should only access it now
40+TEMPLATE_DEBUG = DEBUG
41+
42+from common import utils
43+VERSION_STRING = utils.get_harvest_version(
44+ os.path.join(PROJECT_PATH, "version"),
45+ DEBUG)
46+VERSION_NAME_STRING = utils.get_harvest_version_name(
47+ os.path.join(PROJECT_PATH, "version"),
48+ DEBUG)
49+

Subscribers

People subscribed via source and target branches

to all changes: