From: Art Rhyno Date: Tue, 21 Jun 2011 22:18:17 +0000 (-0400) Subject: Moved evergreen-specific item values to integration class. This X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=137752c723f5d23349880a3dbb3372f48de517c4;p=Syrup.git Moved evergreen-specific item values to integration class. This is much cleaner. Signed-off-by: Art Rhyno --- diff --git a/conifer/integration/uwindsor.py b/conifer/integration/uwindsor.py index d568093..e4f0511 100644 --- a/conifer/integration/uwindsor.py +++ b/conifer/integration/uwindsor.py @@ -11,7 +11,6 @@ from django.utils import simplejson class UWindsorIntegration(EvergreenIntegration): - OSRF_CAT_SEARCH_ORG_UNIT = 106 OPAC_LANG = 'en-CA' @@ -20,6 +19,22 @@ class UWindsorIntegration(EvergreenIntegration): RESERVES_DESK_NAME = 'Leddy: Course Reserves - Main Bldng - 1st Flr - Reserve Counter at Circulation Desk' SITE_DEFAULT_ACCESS_LEVEL = 'RESTR' + # Options for circ modifiers + MODIFIER_CHOICES = [ + ('CIRC', 'Normal'), + ('RSV2', '2 Hour'), + ('RSV1', '1 Day'), + ('RSV3', '3 Day'), + ('RSV7', '7 Day'), + ] + + # TODO: these are harcoded for now, should make the opensrf calls to resolve them + # Options for circ desk + DESK_CHOICES = [ + ('631', 'Reserves Counter'), + ('598', 'Circulating Collection'), + ] + #--------------------------------------------------------------------------- # proxy server integration diff --git a/conifer/syrup/models.py b/conifer/syrup/models.py index f987301..702eb80 100644 --- a/conifer/syrup/models.py +++ b/conifer/syrup/models.py @@ -668,8 +668,6 @@ class Item(BaseModel): #orig_callno: this is a copy of the call number associated with the barcode orig_callno = m.CharField(max_length=64, null=True, blank=True) - # TODO: all of the choices should probably go in settings, as per EVERGREEN_UPDATE_CHOICES - # Options for evergreen updates EVERGREEN_UPDATE_CHOICES = getattr(integration_class, 'UPDATE_CHOICES', [('', 'n/a')]) @@ -690,30 +688,21 @@ class Item(BaseModel): choices=COPYRIGHT_STATUS_CHOICES, default='UK') - # TODO: fixme, the CIRC stuff here is very Leddy specific. - - # Options for circ modifiers - CIRC_MODIFIER_CHOICES = [ - ('CIRC', 'Normal'), - ('RSV2', '2 Hour'), - ('RSV1', '1 Day'), - ('RSV3', '3 Day'), - ('RSV7', '7 Day'), - ] + # These are defined in integration class + CIRC_MODIFIER_CHOICES = getattr(integration_class, 'MODIFIER_CHOICES', + [('', 'n/a')]) circ_modifier = m.CharField(max_length=10, choices=CIRC_MODIFIER_CHOICES, - default='RSV2', blank=True) + default=CIRC_MODIFIER_CHOICES[0][0], blank=True) - # Options for circ desk - CIRC_DESK_CHOICES = [ - ('631', 'Reserves Counter'), - ('598', 'Circulating Collection'), - ] + # These are defined in integration class + CIRC_DESK_CHOICES = getattr(integration_class, 'DESK_CHOICES', + [('', 'n/a')]) circ_desk = m.CharField(max_length=5, choices=CIRC_DESK_CHOICES, - default='631', blank=True) + default=CIRC_DESK_CHOICES[0][0], blank=True) ITEMTYPE_CHOICES = [ # From http://www.oclc.org/bibformats/en/fixedfield/type.shtm.