From 41c18d9a40f4adbc2f3b670ac837211d911840a9 Mon Sep 17 00:00:00 2001 From: Art Rhyno Date: Sun, 7 Apr 2013 19:47:57 -0400 Subject: [PATCH] Add note to local_settings example EVERGREEN_SEARCH_DEPTH needs to be set to 1 to return IDs, this is the default but the consequences of not doing so needs to be clearer. Signed-off-by: Art Rhyno --- conifer/integration/cas.py | 1 + conifer/integration/evergreen_example.py | 7 +++++-- conifer/local_settings.py.example | 4 ++-- conifer/syrup/models.py | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/conifer/integration/cas.py b/conifer/integration/cas.py index bdd0ddc..e502ccd 100644 --- a/conifer/integration/cas.py +++ b/conifer/integration/cas.py @@ -42,6 +42,7 @@ class CASBackend(backends.CASBackend): """Authenticates CAS ticket and retrieves user data""" user = super(CASBackend, self).authenticate(ticket, service) + print "user", user if user: user.maybe_decorate() return user diff --git a/conifer/integration/evergreen_example.py b/conifer/integration/evergreen_example.py index 4eb4fc3..a07127c 100644 --- a/conifer/integration/evergreen_example.py +++ b/conifer/integration/evergreen_example.py @@ -5,12 +5,15 @@ import subprocess from django.conf import settings from urllib2 import urlopen from django.utils import simplejson -from conifer.libsystems.evergreen import opensrf +try: + from conifer.libsystems.evergreen import opensrf +except ImportError: + print "evergreen access without opensrf library" class EvergreenExampleIntegration(EvergreenIntegration): - OSRF_CAT_SEARCH_ORG_UNIT = 28 + OSRF_CAT_SEARCH_ORG_UNIT = 106 OPAC_LANG = 'en-US' OPAC_SKIN = 'default' diff --git a/conifer/local_settings.py.example b/conifer/local_settings.py.example index eb25784..fd5a561 100644 --- a/conifer/local_settings.py.example +++ b/conifer/local_settings.py.example @@ -72,8 +72,8 @@ MIN_QUERY_LENGTH = 3 # Set these for limiting options for status displays #EVERGREEN_STATUS_ORG = 28 #EVERGREEN_STATUS_DEPTH = 1 -# Set this for limiting searching -#EVERGREEN_SEARCH_DEPTH = 0 +# Set this for limiting searching - note that a value of 0 will not give you ids for adding the record to a course +#EVERGREEN_SEARCH_DEPTH = 1 # Note, in the Evergreen integration, commenting out Z3950_CONFIG or setting it # equal to None will result in OpenSRF being used for catalogue search instead diff --git a/conifer/syrup/models.py b/conifer/syrup/models.py index d1f794e..19ee817 100644 --- a/conifer/syrup/models.py +++ b/conifer/syrup/models.py @@ -978,6 +978,7 @@ def highlight(text, phrase, # Activate the local integration module. We loaded the module at the top of # models.py, now we instantiate it. + if integration_class: initialize_hooks(integration_class()) -- 2.11.0