From 2764317bbb20611c4d31a71db3a4d5362bb3e70c Mon Sep 17 00:00:00 2001 From: gfawcett Date: Thu, 25 Mar 2010 03:44:44 +0000 Subject: [PATCH] put HERE definition in its own module. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@843 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- conifer/here.py | 5 +++++ conifer/syrup/views/_common.py | 1 + conifer/syrup/views/general.py | 5 ----- 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 conifer/here.py diff --git a/conifer/here.py b/conifer/here.py new file mode 100644 index 0000000..430b499 --- /dev/null +++ b/conifer/here.py @@ -0,0 +1,5 @@ +import os + +BASE_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) + +HERE = lambda s: os.path.join(BASE_DIRECTORY, s) diff --git a/conifer/syrup/views/_common.py b/conifer/syrup/views/_common.py index 60587a0..8b74843 100644 --- a/conifer/syrup/views/_common.py +++ b/conifer/syrup/views/_common.py @@ -38,6 +38,7 @@ from conifer.custom import lib_integration from conifer.libsystems.z3950.marcxml import marcxml_to_dictionary, marcxml_dictionary_to_dc from conifer.syrup.fuzzy_match import rank_pending_items from django.core.urlresolvers import reverse +from conifer.here import HERE #----------------------------------------------------------------------------- # Z39.50 Support diff --git a/conifer/syrup/views/general.py b/conifer/syrup/views/general.py index 8c49001..4e6dc1d 100644 --- a/conifer/syrup/views/general.py +++ b/conifer/syrup/views/general.py @@ -6,11 +6,6 @@ from search import * #import libxslt import os - -BASE_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) -HERE = lambda s: os.path.join(BASE_DIRECTORY, s) - - #----------------------------------------------------------------------------- def welcome(request): -- 2.11.0