From: artunit Date: Fri, 8 Apr 2011 20:51:01 +0000 (+0000) Subject: working towards a generic installation first with site-specific integration afterwards X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b1861f1d1b1f0feac0672c17009f717f76250c59;p=syrup%2Fmasslnc.git working towards a generic installation first with site-specific integration afterwards git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@1319 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- diff --git a/conifer/README b/conifer/README index bf46180..8b06807 100644 --- a/conifer/README +++ b/conifer/README @@ -20,14 +20,13 @@ course. Required components ------------------------------ -You need Python. Probably Python 2.5, I haven't tested with other -versions. You also need sqlite3 or another Django-compatible +You need Python. You also need sqlite3 or another Django-compatible database. Sqlite3 is recommended for kicking the tires, PostgreSQL for production. Third-party Python dependencies: - sudo easy_install Django Genshi Babel BabelDjango + sudo easy_install Django Genshi Babel BabelDjango South Pyz3950 lxml ply (You'll need 'setuptools' in order to have 'easy_install'.) @@ -35,22 +34,12 @@ Windows is very similar, see: http://groups.google.com/group/syrup-reserves-discuss/web/installing-syrup-in-windows -Graham has the following versions installed. Not saying you need these -exact ones, just that they are known to work. - - Django-1.0.1_final-py2.5 - Babel-0.9.4-py2.5 - BabelDjango-0.2.2-py2.5 - Genshi-0.5.1-py2.5 - South-0.7 - Getting this thing to run ------------------------------ This might work: -* Review settings.py. Maybe you need to edit stuff. Probably not for a - quick test. +* Copy local_settings.py.example to local_settings.py, and review the settings * ./manage.py syncdb @@ -73,30 +62,3 @@ C:\src\syrup\trunk\conifer>manage.py syncdb * make yourself a course. * click on all of the links and see what they do. - - -Contents [out of date -- Ed.] ------------------------------- - -syrup/ -- the reserves app -middleware/ -- middleware component to integrate Genshi -locale/ -- the gettext files -templates/ -- the Genshi templates -static/ -- static JS, CSS, image files -doc/ -- documentation on the app - -local_settings.py.in -- a template for local_settings.py -genshi_support.py -- Genshi template integration -pybabel-extract -- a "make all" for the i18n files -babel.cfg -- Babel (i18n) configuration file - -The rest is straightforward Django stuff. - - -Customization ------------------------------- - -The 'custom' directory contains (or should contain!) all of the bits -that you really need to customize for your institution. More -documentation is needed here, but the source code is mostly -well-documented. \ No newline at end of file diff --git a/conifer/integration/uwindsor.py b/conifer/integration/uwindsor.py index e49f7b3..a3c0db5 100644 --- a/conifer/integration/uwindsor.py +++ b/conifer/integration/uwindsor.py @@ -18,8 +18,8 @@ class UWindsorIntegration(EvergreenIntegration): # proxy server integration ezproxy_service = ezproxy.EZProxyService( - settings.UWINDSOR_EZPROXY_HOST, - settings.UWINDSOR_EZPROXY_PASSWORD) + settings.EZPROXY_HOST, + settings.EZPROXY_PASSWORD) def proxify_url(self, url): """ @@ -149,7 +149,6 @@ class UWindsorIntegration(EvergreenIntegration): will be used. """ # as per Joan Dalton, 2010-12-21. - # TODO: move this to local_settings return ("I warrant that I am a student of the University of Windsor " "enrolled in a course of instruction. By pressing the " "'Request' button below, I am requesting a digital copy of a " diff --git a/conifer/libsystems/evergreen/support.py b/conifer/libsystems/evergreen/support.py index 3b388b1..e94c317 100644 --- a/conifer/libsystems/evergreen/support.py +++ b/conifer/libsystems/evergreen/support.py @@ -23,8 +23,10 @@ def initialize(base): def _fields(): fm_idl_file = os.path.join(os.path.dirname(__file__), 'fm_IDL.xml') - with open(fm_idl_file) as f: - tree = ElementTree.parse(f) + f = open(fm_idl_file) + # to get around 2.5.x python installations + # with open(fm_idl_file) as f: + tree = ElementTree.parse(f) # fm_IDL_location = BASE + 'reports/fm_IDL.xml' # tree = ElementTree.parse(urllib2.urlopen(fm_IDL_location)) NS = '{http://opensrf.org/spec/IDL/base/v1}' diff --git a/conifer/local_settings.py.example b/conifer/local_settings.py.example index e296f4c..feec57b 100644 --- a/conifer/local_settings.py.example +++ b/conifer/local_settings.py.example @@ -31,6 +31,15 @@ TIME_ZONE = 'America/Detroit' SECRET_KEY = 'replace-with-your-own-super-random-key-@vv(tuvt2+yu2r-$dxs$s7=iqjz_s!&' #---------------------------------------------------------------------- +# EZproxy integration +EZPROXY_HOST = 'ezproxy.library.org' +EZPROXY_PASSWORD = '' + +#---------------------------------------------------------------------- +# For campus information - ignore if not applicable for your organization +CAMPUS_INFO_SERVICE = 'http://sample.campus.info' + +#---------------------------------------------------------------------- # Authentication systems EVERGREEN_AUTHENTICATION = False # Evergreen ILS authentication @@ -60,7 +69,15 @@ Z3950_CONFIG = ('zed.concat.ca', 210, 'OWA') #OWA,OSUL,CONIFER # LOGIN (any logged in user), MEMBR (only explicit members of the # site), and CLOSE (only instructors/owners of the site). -# SITE_DEFAULT_ACCESS_LEVEL = 'MEMBR' +#---------------------------------------------------------------------- +# UPDATE_CHOICES: these options are only surfaced when a site +# enables updates from syrup to the catalogue + +UPDATE_CHOICES = [ + ('One', 'Syrup-only'), + ('Cat', 'Catalogue'), + ('Zap', 'Remove from Syrup'), + ] #---------------------------------------------------------------------- # INTEGRATION_CLASS: name of a class to instantiate after the database models @@ -68,5 +85,5 @@ Z3950_CONFIG = ('zed.concat.ca', 210, 'OWA') #OWA,OSUL,CONIFER # other late initializations. See the 'conifer.syrup.integration' module for # more information. -INTEGRATION_CLASS = 'conifer.integration.uwindsor.UWindsorIntegration' +#INTEGRATION_CLASS = 'conifer.integration.uwindsor.UWindsorIntegration' diff --git a/conifer/syrup/urls.py b/conifer/syrup/urls.py index 778337b..0ec6dfd 100644 --- a/conifer/syrup/urls.py +++ b/conifer/syrup/urls.py @@ -8,7 +8,6 @@ GENERIC_REGEX = r'((?P\d+)/)?(?P.+)?$' urlpatterns = patterns('conifer.syrup.views', (r'^$', 'welcome'), - (r'^test/$', 'item_ils_update_test'), (r'^site/$', 'my_sites'), (r'^site/new/$', 'add_new_site'), (r'^site/invitation/$', 'site_invitation'), diff --git a/conifer/urls.py b/conifer/urls.py index 5440fb4..c445eae 100644 --- a/conifer/urls.py +++ b/conifer/urls.py @@ -21,7 +21,8 @@ urlpatterns = patterns('', (r'^djadmin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: - (r'^djadmin/(.*)', admin.site.root), + url(r'^admin/', include(admin.site.urls)), + # old form: (r'^djadmin/(.*)', admin.site.root), (r'^djmedia/(.*)', 'django.views.static.serve', {'document_root': ADMIN_MEDIA_ROOT}), (r'^static/(?P.*)$', 'django.views.static.serve',