From e487a32a1f15f4b07ac643dd42d60dbf437fa204 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Thu, 13 Oct 2011 00:47:13 +0000 Subject: [PATCH] Use const.VERSION svn: r18309 --- src/web/grampsdb/views.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/web/grampsdb/views.py b/src/web/grampsdb/views.py index 6e6364886..206f878b1 100644 --- a/src/web/grampsdb/views.py +++ b/src/web/grampsdb/views.py @@ -48,6 +48,7 @@ from web.dbdjango import DbDjango import gen.proxy from Utils import create_id +import const _ = lambda text: text @@ -63,19 +64,6 @@ VIEWS = [(_('People'), 'person', Name), (_('Tags'), 'tag', Tag), ] -def get_version(): - #Makefile:VERSIONSTRING = 3.4.0-0.SVN18300 - version = "trunk.SVN" - try: - fp = file("/usr/local/wsgi/trunk//Makefile") - except: - return version - for line in fp: - if line.startswith("VERSIONSTRING"): - junk, version = [item.strip() for item in line.split("=", 1)] - break - return version - def context_processor(request): """ This function is executed before template processing. @@ -88,7 +76,7 @@ def context_processor(request): else: context["css_theme"] = "Web_Mainz.css" # Other things for all environments: - context["gramps_version"] = get_version() + context["gramps_version"] = const.VERSION context["views"] = VIEWS context["True"] = True context["False"] = False