From 26e859fc870b44caa375dc5e93f899274a6a1d07 Mon Sep 17 00:00:00 2001 From: dbs Date: Wed, 27 Aug 2008 20:22:48 +0000 Subject: [PATCH] Farewell to the long-deprecated Django administration interface git-svn-id: svn://svn.open-ils.org/ILS/trunk@10467 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Makefile.am | 1 - Open-ILS/admin/ils_admin/README | 15 - Open-ILS/admin/ils_admin/__init__.py | 0 Open-ILS/admin/ils_admin/manage.py | 11 - Open-ILS/admin/ils_admin/settings.py.example | 100 ---- Open-ILS/admin/ils_admin/setup/__init__.py | 0 .../ils_admin/setup/ils_data/__init__.py | 0 .../admin/ils_admin/setup/ils_data/models.py | 563 ------------------ Open-ILS/admin/ils_admin/setup/views.py | 1 - Open-ILS/admin/ils_admin/urls.py | 5 - Open-ILS/src/Makefile.am | 4 - 11 files changed, 700 deletions(-) delete mode 100644 Open-ILS/admin/ils_admin/README delete mode 100644 Open-ILS/admin/ils_admin/__init__.py delete mode 100755 Open-ILS/admin/ils_admin/manage.py delete mode 100644 Open-ILS/admin/ils_admin/settings.py.example delete mode 100644 Open-ILS/admin/ils_admin/setup/__init__.py delete mode 100644 Open-ILS/admin/ils_admin/setup/ils_data/__init__.py delete mode 100644 Open-ILS/admin/ils_admin/setup/ils_data/models.py delete mode 100644 Open-ILS/admin/ils_admin/setup/views.py delete mode 100644 Open-ILS/admin/ils_admin/urls.py diff --git a/Makefile.am b/Makefile.am index c65e70293f..8659466fa2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,7 +22,6 @@ export catalogscriptdir=@localstatedir@/catalog export penaltyrulesdir=@localstatedir@/penalty export XSLDIR=@localstatedir@/xsl export REPORTERDIR=@localstatedir@/reporter -export ADMINDIR=@localstatedir@/admin export SOCK=@localstatedir@/lock export PID=@localstatedir@/run export LOG=@localstatedir@/log diff --git a/Open-ILS/admin/ils_admin/README b/Open-ILS/admin/ils_admin/README deleted file mode 100644 index 59ccf2c6e1..0000000000 --- a/Open-ILS/admin/ils_admin/README +++ /dev/null @@ -1,15 +0,0 @@ -1. Set up the database params in settings.py -2. Run "python manage.py syncdb" from within OpenILS/admin/ils_admin directory. - This will install the necessary Django tables in the database. - -see http://www.djangoproject.com/documentation/ for more. - -3. If you use Apache2/mod_python, create a symlink to "media" in your document root (e.g /openils/var/web) to the admin media dir: -e.g. /usr/lib/python2.4/site-packages/django/contrib/admin/media/ -This can also be accomplished with an Alias directive in Apache config - - -... should we create a default django.db to distribute? - - - diff --git a/Open-ILS/admin/ils_admin/__init__.py b/Open-ILS/admin/ils_admin/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Open-ILS/admin/ils_admin/manage.py b/Open-ILS/admin/ils_admin/manage.py deleted file mode 100755 index 5e78ea979e..0000000000 --- a/Open-ILS/admin/ils_admin/manage.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python -from django.core.management import execute_manager -try: - import settings # Assumed to be in the same directory. -except ImportError: - import sys - sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) - sys.exit(1) - -if __name__ == "__main__": - execute_manager(settings) diff --git a/Open-ILS/admin/ils_admin/settings.py.example b/Open-ILS/admin/ils_admin/settings.py.example deleted file mode 100644 index 9dc74eef82..0000000000 --- a/Open-ILS/admin/ils_admin/settings.py.example +++ /dev/null @@ -1,100 +0,0 @@ -# Django settings for ils_admin project. - -DEBUG = True -TEMPLATE_DEBUG = DEBUG - -ADMINS = ( - # ('Your Name', 'your_email@domain.com'), -) - -MANAGERS = ADMINS - -DATABASE_ENGINE = 'sqlite3' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. -DATABASE_NAME = 'LOCALSTATEDIR/data/django.db' # Or path to database file if using sqlite3. -DATABASE_SCHEMAS = '' -DATABASE_USER = '' # Not used with sqlite3. -DATABASE_PASSWORD = '' # Not used with sqlite3. -DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. -DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. - -""" -2007-03-28: the "django" user in the primary ILS database needs to have -the following schemas set in the default search path: actor, permission, public, config -""" - -OTHER_DATABASES = { - 'ils_data': { - 'DATABASE_ENGINE' : 'postgresql_psycopg2', - 'DATABASE_NAME' : 'evergreen', - 'DATABASE_HOST' : '127.0.0.1', - 'DATABASE_PORT' : '5432', - 'DATABASE_USER' : 'django', - 'DATABASE_PASSWORD' : '', - 'MODELS': ['ils_data'] - }, -} - -# Local time zone for this installation. All choices can be found here: -# http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE -TIME_ZONE = 'America/New_York' - -# Language code for this installation. All choices can be found here: -# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes -# http://blogs.law.harvard.edu/tech/stories/storyReader$15 -LANGUAGE_CODE = 'en-us' - -SITE_ID = 1 - -# If you set this to False, Django will make some optimizations so as not -# to load the internationalization machinery. -USE_I18N = True - -# Absolute path to the directory that holds media. -# Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = '' - -# URL that handles the media served from MEDIA_ROOT. -# Example: "http://media.lawrence.com" -MEDIA_URL = '' - -# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a -# trailing slash. -# Examples: "http://foo.com/media/", "/media/". -ADMIN_MEDIA_PREFIX = '/media/' - -# Make this unique, and don't share it with anybody. -SECRET_KEY = 'rpbefxd0ahnu0pz1hyw6fo$_fj%%op!d9*7bqh0dw=&-^dz8%z' - -# List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.load_template_source', - 'django.template.loaders.app_directories.load_template_source', -# 'django.template.loaders.eggs.load_template_source', -) - -MIDDLEWARE_CLASSES = ( - 'django.middleware.common.CommonMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.middleware.doc.XViewMiddleware', -) - -ROOT_URLCONF = 'ils_admin.urls' - -TEMPLATE_DIRS = ( - # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". - # Always use forward slashes, even on Windows. - # Don't forget to use absolute paths, not relative paths. - 'LOCALSTATEDIR/admin/ils_admin/templates/default' -) - -INSTALLED_APPS = ( - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.sites', - 'django.contrib.admin', - 'ils_admin.setup', - 'ils_admin.setup.ils_data', # load the ILS models -) - diff --git a/Open-ILS/admin/ils_admin/setup/__init__.py b/Open-ILS/admin/ils_admin/setup/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Open-ILS/admin/ils_admin/setup/ils_data/__init__.py b/Open-ILS/admin/ils_admin/setup/ils_data/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Open-ILS/admin/ils_admin/setup/ils_data/models.py b/Open-ILS/admin/ils_admin/setup/ils_data/models.py deleted file mode 100644 index ea19cec87b..0000000000 --- a/Open-ILS/admin/ils_admin/setup/ils_data/models.py +++ /dev/null @@ -1,563 +0,0 @@ -from django.db import models -from django.db.models import signals -from django.dispatch import dispatcher -import datetime -from gettext import gettext as _ - -INTERVAL_HELP_TEXT = _('examples: "1 hour", "14 days", "3 months", "DD:HH:MM:SS.ms"') -CHAR_MAXLEN=200 # just provide a sane default - - -""" -------------------------------------------------------------- - Permission tables - -------------------------------------------------------------- """ - - -class PermList(models.Model): - code = models.CharField(maxlength=100) - description = models.TextField(blank=True) - class Admin: - list_display = ('code','description') - search_fields = ['code'] - class Meta: - db_table = 'perm_list' - ordering = ['code'] - verbose_name = _('Permission') - def __str__(self): - return self.code - -class GrpPermMap(models.Model): - grp_id = models.ForeignKey('GrpTree', db_column='grp') - perm_id = models.ForeignKey(PermList, db_column='perm') - depth_id = models.ForeignKey('OrgUnitType', to_field='depth', db_column='depth') - grantable = models.BooleanField() - class Admin: - list_filter = ['grp_id'] - list_display = ('perm_id', 'grp_id', 'depth_id') - class Meta: - db_table = 'grp_perm_map' - ordering = ['perm_id', 'grp_id'] - verbose_name = _('Permission Setting') - def __str__(self): - return str(self.grp_id)+' -> '+str(self.perm_id) - -class GrpTree(models.Model): - name = models.CharField(maxlength=100) - parent_id = models.ForeignKey('self', null=True, related_name='children', db_column='parent') - description = models.CharField(blank=True, maxlength=CHAR_MAXLEN) - perm_interval = models.CharField(blank=True, maxlength=100, help_text=INTERVAL_HELP_TEXT) - application_perm = models.CharField(blank=True, maxlength=100) - usergroup = models.BooleanField() - class Admin: - list_display = ('name', 'description') - list_filter = ['parent_id'] - search_fields = ['name', 'description'] - class Meta: - db_table = 'grp_tree' - ordering = ['name'] - verbose_name = _('User Group') - def __str__(self): - return self.name - - - - - -""" There's no way to do user-based mangling given the size of the data without custom handling. - When you try to create a new permission map, it tries to load all users into a dropdown selector :( - -class User(models.Model): - card_id = models.ForeignKey('Card', db_column='card') - profile_id = models.ForeignKey(GrpTree, db_column='profile') - usrname = models.CharField(blank=False, null=False, maxlength=CHAR_MAXLEN) - def __str__(self): - return "%s (%s)" % ( str(self.card_id), str(self.usrname)) - class Meta: - db_table = 'usr' - verbose_name = 'User' - -class UsrPermMap(models.Model): - usr_id = models.ForeignKey(User, db_column='usr') - perm_id = models.ForeignKey(PermList, db_column='perm') - depth_id = models.ForeignKey(OrgUnitType, to_field='depth', db_column='depth') - grantable = models.BooleanField() - class Admin: - search_fields = ['usr_id', 'perm_id'] # we need text fields to search... - class Meta: - db_table = 'usr_perm_map' - verbose_name = 'User Permission' - def __str__(self): - return "%s -> %s" % ( str(self.usr_id), str(self.perm_id) ) - - -class Card(models.Model): - usr_id = models.ForeignKey(User, db_column='usr') - barcode = models.CharField(blank=False, null=False, maxlength=CHAR_MAXLEN) - active = models.BooleanField() - def __str__(self): - return self.barcode - class Meta: - db_table = 'card' - verbose_name = 'Card' -""" - - - -""" -------------------------------------------------------------- - Actor tables - -------------------------------------------------------------- """ - -class OrgUnitType(models.Model): - name = models.CharField(maxlength=100) - opac_label = models.CharField(maxlength=100) - depth = models.IntegerField() - parent_id = models.ForeignKey('self', null=True, related_name='children', db_column='parent') - can_have_vols = models.BooleanField() - can_have_users = models.BooleanField() - class Meta: - db_table = 'org_unit_type' - verbose_name = _('Organizational Unit Type') - class Admin: - list_display = ('name', 'depth') - list_filter = ['parent_id'] - ordering = ['depth'] - def __str__(self): - return self.name - -class OrgUnitSetting(models.Model): - org_unit_id = models.ForeignKey('OrgUnit', db_column='org_unit') - name = models.CharField(maxlength=CHAR_MAXLEN) - value = models.CharField(maxlength=CHAR_MAXLEN) - class Admin: - list_display = ('org_unit_id', 'name', 'value') - search_fields = ['name', 'value'] - list_filter = ['name', 'org_unit_id'] - class Meta: - db_table = 'org_unit_setting' - ordering = ['org_unit_id', 'name'] - verbose_name = _('Organizational Unit Setting') - def __str__(self): - return "%s:%s=%s" % (self.org_unit_id.shortname, self.name, self.value) - - -class OrgAddress(models.Model): - valid = models.BooleanField() - org_unit_id = models.ForeignKey('OrgUnit', db_column='org_unit') - address_type = models.CharField(blank=False, maxlength=CHAR_MAXLEN, default=_('MAILING')) - street1 = models.CharField(blank=False, maxlength=CHAR_MAXLEN) - street2 = models.CharField(maxlength=CHAR_MAXLEN) - city = models.CharField(blank=False, maxlength=CHAR_MAXLEN) - county = models.CharField(maxlength=CHAR_MAXLEN) - state = models.CharField(blank=False, maxlength=CHAR_MAXLEN) - country = models.CharField(blank=False, maxlength=CHAR_MAXLEN) - post_code = models.CharField(blank=False, maxlength=CHAR_MAXLEN) - class Admin: - search_fields = ['street1', 'city', 'post_code'] - list_filter = ['org_unit_id'] - list_display = ('street1', 'street2', 'city', 'county', 'state', 'post_code') - class Meta: - ordering = ['city'] - db_table = 'org_address' - verbose_name = _('Organizational Unit Address') - def __str__(self): - return self.street1+' '+self.city+', '+self.state+' '+self.post_code - -class OrgUnit(models.Model): - parent_ou_id = models.ForeignKey('self', null=True, related_name='children', db_column='parent_ou') - ou_type_id = models.ForeignKey(OrgUnitType, db_column='ou_type') - shortname = models.CharField(maxlength=CHAR_MAXLEN) - name = models.CharField(maxlength=CHAR_MAXLEN) - email = models.EmailField(null=True, blank=True) - phone = models.CharField(maxlength=CHAR_MAXLEN, null=True, blank=True) - opac_visible = models.BooleanField(blank=True) - ill_address_id = models.ForeignKey(OrgAddress, - db_column='ill_address', related_name='ill_addresses', null=True, blank=True) - holds_address_id = models.ForeignKey(OrgAddress, - db_column='holds_address', related_name='holds_addresses', null=True, blank=True) - mailing_address_id = models.ForeignKey(OrgAddress, - db_column='mailing_address', related_name='mailing_addresses', null=True, blank=True) - billing_address_id = models.ForeignKey(OrgAddress, - db_column='billing_address', related_name='billing_addresses', null=True, blank=True) - class Admin: - search_fields = ['name', 'shortname'] - list_display = ('shortname', 'name') - class Meta: - db_table = 'org_unit' - ordering = ['shortname'] - verbose_name = _('Organizational Unit') - def __str__(self): - return self.shortname - -class HoursOfOperation(models.Model): - #choices = tuple([ (datetime.time(i), str(i)) for i in range(0,23) ]) - org_unit = models.ForeignKey('OrgUnit', db_column='id') - # XXX add better time widget support - dow_0_open = models.TimeField(_('Monday Open'), null=False, blank=False, default=datetime.time(9)) - dow_0_close = models.TimeField(_('Monday Close'), null=False, blank=False, default=datetime.time(17)) - dow_1_open = models.TimeField(_('Tuesday Open'), null=False, blank=False, default=datetime.time(9)) - dow_1_close = models.TimeField(_('Tuesday Close'), null=False, blank=False, default=datetime.time(17)) - dow_2_open = models.TimeField(_('Wednesday Open'), null=False, blank=False, default=datetime.time(9)) - dow_2_close = models.TimeField(_('Wednesday Close'), null=False, blank=False, default=datetime.time(17)) - dow_3_open = models.TimeField(_('Thursday Open'), null=False, blank=False, default=datetime.time(9)) - dow_3_close = models.TimeField(_('Thursday Close'), null=False, blank=False, default=datetime.time(17)) - dow_4_open = models.TimeField(_('Friday Open'), null=False, blank=False, default=datetime.time(9)) - dow_4_close = models.TimeField(_('Friday Close'), null=False, blank=False, default=datetime.time(17)) - dow_5_open = models.TimeField(_('Saturday Open'), null=False, blank=False, default=datetime.time(9)) - dow_5_close = models.TimeField(_('Saturday Close'), null=False, blank=False, default=datetime.time(17)) - dow_6_open = models.TimeField(_('Sunday Open'), null=False, blank=False, default=datetime.time(9)) - dow_6_close = models.TimeField(_('Sunday Close'), null=False, blank=False, default=datetime.time(17)) - class Admin: - pass - class Meta: - db_table = 'hours_of_operation' - verbose_name = _('Hours of Operation') - verbose_name_plural = verbose_name - def __str__(self): - return str(self.org_unit) - - - -""" -------------------------------------------------------------- - Config tables - -------------------------------------------------------------- """ - -class CircModifier(models.Model): - code = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True) - name = models.CharField(maxlength=CHAR_MAXLEN) - description = models.CharField(maxlength=CHAR_MAXLEN); - sip2_media_type = models.CharField(maxlength=CHAR_MAXLEN); - magnetic_media = models.BooleanField() - class Admin: - search_fields = ['name','code'] - list_display = ('code','name','description','sip2_media_type','magnetic_media') - class Meta: - db_table = 'circ_modifier' - ordering = ['name'] - verbose_name = _('Circulation Modifier') - def __str__(self): - return self.name - - -class VideoRecordingFormat(models.Model): - code = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True) - value = models.CharField(maxlength=CHAR_MAXLEN, help_text=INTERVAL_HELP_TEXT); - class Admin: - search_fields = ['value','code'] - list_display = ('value','code') - class Meta: - db_table = 'videorecording_format_map' - ordering = ['code'] - verbose_name = _('Video Recording Format') - def __str__(self): - return self.value - -class RuleCircDuration(models.Model): - name = models.CharField(maxlength=CHAR_MAXLEN) - extended = models.CharField(maxlength=CHAR_MAXLEN, help_text=INTERVAL_HELP_TEXT); - normal = models.CharField(maxlength=CHAR_MAXLEN, help_text=INTERVAL_HELP_TEXT); - shrt = models.CharField(maxlength=CHAR_MAXLEN, help_text=INTERVAL_HELP_TEXT); - max_renewals = models.IntegerField() - class Admin: - search_fields = ['name'] - list_display = ('name','extended','normal','shrt','max_renewals') - class Meta: - db_table = 'rule_circ_duration' - ordering = ['name'] - verbose_name = _('Circ Duration Rule') - def __str__(self): - return self.name - -class CircMatrixMatchpoint(models.Model): - active = models.BooleanField(blank=False, default=True) - org_unit_id = models.ForeignKey(OrgUnit, db_column='org_unit', blank=False) - grp_id = models.ForeignKey(GrpTree, db_column='grp', blank=False, verbose_name=_("User Group")) - circ_modifier_id = models.ForeignKey(CircModifier, db_column='circ_modifier', null=True,blank=True) - marc_type_id = models.ForeignKey('ItemTypeMap', db_column='marc_type', null=True,blank=True) - marc_form_id = models.ForeignKey('ItemFormMap', db_column='marc_form', null=True,blank=True) - marc_vr_format_id = models.ForeignKey('VideoRecordingFormat', db_column='marc_vr_format', null=True,blank=True) - ref_flag = models.BooleanField(null=True) - usr_age_lower_bound = models.CharField(maxlength=CHAR_MAXLEN, help_text=INTERVAL_HELP_TEXT, null=True, blank=True) - usr_age_upper_bound = models.CharField(maxlength=CHAR_MAXLEN, help_text=INTERVAL_HELP_TEXT, null=True, blank=True) - - def save(self): - ''' Override to force None-ness on the interval fields ''' - if self.usr_age_lower_bound == "": - self.usr_age_lower_bound = None - if self.usr_age_upper_bound == "": - self.usr_age_upper_bound = None - return models.Model.save(self) - - class Admin: - search_fields = ['grp_id','org_unit_id','circ_modifier_id','marc_type_id','marc_form_id', - 'marc_vr_format_id','usr_age_lower_bound','usr_age_upper_bound'] - - list_display = ('grp_id','org_unit_id','circ_modifier_id','marc_type_id','marc_form_id', - 'marc_vr_format_id','ref_flag','usr_age_lower_bound','usr_age_upper_bound') - - list_filter = ['grp_id','org_unit_id','circ_modifier_id','marc_type_id','marc_form_id','marc_vr_format_id'] - class Meta: - db_table = 'circ_matrix_matchpoint' - ordering = ['id'] - verbose_name = _('Circulation Matrix Matchpoint') - def __str__(self): - return _("OrgUnit: %(orgid)s, Group: %(grpid)s, Circ Modifier: %(modid)s") % { - 'orgid':self.org_unit_id, 'grpid':self.grp_id, 'modid':self.circ_modifier_id} - -class CircMatrixTest(models.Model): - matchpoint_id = models.ForeignKey(CircMatrixMatchpoint, db_column='matchpoint', blank=False, primary_key=True, - edit_inline=models.TABULAR, core=True, num_in_admin=1) - max_items_out = models.IntegerField(null=True, blank=True) - max_overdue = models.IntegerField(null=True, blank=True) - max_fines = models.FloatField(max_digits=8, decimal_places=2, null=True, blank=True) - script_test = models.CharField(maxlength=CHAR_MAXLEN, null=True, blank=True) - class Admin: - list_display = ('matchpoint_id','max_items_out','max_overdue','max_fines','script_test') - class Meta: - db_table = 'circ_matrix_test' - ordering = ['matchpoint_id'] - verbose_name = _('Circ Matrix Test') - def __str__(self): - return _("%(mid)s, Max Items Out: %(iout)s, Max Overdue: %(odue)s, Max Fines: %(fines)s") % { - 'mid': self.matchpoint_id, 'iout' : self.max_items_out, 'odue':self.max_overdue, 'fines':self.max_fines} - -class CircMatrixCircModTest(models.Model): - matchpoint_id = models.ForeignKey(CircMatrixMatchpoint, db_column='matchpoint', blank=False, edit_inline=True,core=True, num_in_admin=1) - items_out = models.IntegerField(blank=False) - circ_mod_id = models.ForeignKey(CircModifier, db_column='circ_mod', blank=False) - class Admin: - search_fields = ['circ_mod_id'] - list_display = ('matchpoint_id','circ_mod_id','items_out') - class Meta: - db_table = 'circ_matrix_circ_mod_test' - ordering = ['matchpoint_id'] - verbose_name = _('Circ Matrix Items Out Cirulation Modifier Subtest') - def __str__(self): - return _("%(mid)s, Restriction: %(mod)s") % {'mid': self.matchpoint_id,'mod':self.circ_mod_id} - -class CircMatrixRuleSet(models.Model): - matchpoint_id = models.ForeignKey(CircMatrixMatchpoint, db_column='matchpoint', - blank=False, primary_key=True, edit_inline=True,core=True, num_in_admin=1) - duration_rule_id = models.ForeignKey(RuleCircDuration, db_column='duration_rule', blank=False) - recurring_fine_rule_id = models.ForeignKey('RuleRecurringFine', db_column='recurring_fine_rule', blank=False) - max_fine_rule_id = models.ForeignKey('RuleMaxFine', db_column='max_fine_rule', blank=False) - class Admin: - search_fields = ['matchoint_id'] - list_display = ('matchpoint_id','duration_rule_id','recurring_fine_rule_id','max_fine_rule_id') - class Meta: - db_table = 'circ_matrix_ruleset' - ordering = ['matchpoint_id'] - verbose_name = _('Circ Matrix Rule Set') - def __str__(self): - return _("Duration: %(dur)s, Recurring Fine: %(rfine)s, Max Fine: %(mfine)s") % { - 'dur':self.duration_rule_id, 'rfine':self.recurring_fine_rule_id, 'mfine':self.max_fine_rule_id} - -class RuleMaxFine(models.Model): - name = models.CharField(maxlength=CHAR_MAXLEN) - amount = models.FloatField(max_digits=6, decimal_places=2) - class Admin: - search_fields = ['name'] - list_display = ('name','amount') - class Meta: - db_table = 'rule_max_fine' - ordering = ['name'] - verbose_name = _('Circ Max Fine Rule') - def __str__(self): - return self.name - -class RuleRecurringFine(models.Model): - name = models.CharField(maxlength=CHAR_MAXLEN) - high = models.FloatField(max_digits=6, decimal_places=2) - normal = models.FloatField(max_digits=6, decimal_places=2) - low = models.FloatField(max_digits=6, decimal_places=2) - class Admin: - search_fields = ['name'] - list_display = ('name','high', 'normal', 'low') - class Meta: - db_table = 'rule_recuring_fine' - ordering = ['name'] - verbose_name = 'Circ Recurring Fine Rule' - def __str__(self): - return self.name - -class IdentificationType(models.Model): - name = models.CharField(maxlength=CHAR_MAXLEN) - class Admin: - search_fields = ['name'] - class Meta: - db_table = 'identification_type' - ordering = ['name'] - verbose_name = _('Identification Type') - def __str__(self): - return self.name - - -class RuleAgeHoldProtect(models.Model): - name = models.CharField(maxlength=CHAR_MAXLEN) - age = models.CharField(blank=True, maxlength=100, help_text=INTERVAL_HELP_TEXT) - prox = models.IntegerField() - class Admin: - search_fields = ['name'] - class Meta: - db_table = 'rule_age_hold_protect' - ordering = ['name'] - verbose_name = _('Hold Age Protection Rule') - def __str__(self): - return self.name - - - -class MetabibField(models.Model): - field_class_choices = ( - ('title', 'Title'), - ('author', 'Author'), - ('subject', 'Subject'), - ('series', 'Series'), - ('keyword', 'Keyword'), - ) - field_class = models.CharField(maxlength=CHAR_MAXLEN, choices=field_class_choices, null=False, blank=False) - name = models.CharField(maxlength=CHAR_MAXLEN, null=False, blank=False) - xpath = models.TextField(null=False, blank=False) - weight = models.IntegerField(null=False, blank=False) - format_id = models.ForeignKey('XmlTransform', db_column='format') - class Admin: - search_fields = ['name', 'field_class', 'format_id'] - list_display = ('field_class', 'name', 'format_id') - class Meta: - db_table = 'metabib_field' - ordering = ['field_class', 'name'] - verbose_name = _('Metabib Field') - def __str__(self): - return self.name - - -class CopyStatus(models.Model): - name = models.CharField(maxlength=CHAR_MAXLEN) - holdable = models.BooleanField() - class Admin: - search_fields = ['name'] - list_display = ('name', 'holdable') - class Meta: - db_table = 'copy_status' - ordering = ['name'] - verbose_name= _('Copy Status') - verbose_name_plural= _('Copy Statuses') - def __str__(self): - return self.name - - -class AudienceMap(models.Model): - code = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True) - value = models.CharField(maxlength=CHAR_MAXLEN, blank=False) - description = models.CharField(maxlength=CHAR_MAXLEN) - class Admin: - search_fields = ['code', 'value', 'description'] - list_display = ('code', 'value', 'description') - class Meta: - db_table = 'audience_map' - ordering = ['code'] - verbose_name = _('Audience Map') - def __str__(self): - return self.code - - -class BibSource(models.Model): - quality = models.IntegerField() - source = models.CharField(maxlength=CHAR_MAXLEN, blank=False) - transcendant = models.BooleanField() - class Admin: - search_fields = ['source'] - list_display = ('source', 'quality', 'transcendant') - class Meta: - db_table = 'bib_source' - ordering = ['source'] - verbose_name = _('Bib Source') - def __str__(self): - return self.source - -class ItemFormMap(models.Model): - code = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True) - value = models.CharField(maxlength=CHAR_MAXLEN, blank=False) - class Admin: - search_fields = ['code', 'value'] - list_display = ('code', 'value') - class Meta: - db_table = 'item_form_map' - ordering = ['code'] - verbose_name = _('Item Form Map') - def __str__(self): - return self.code - -class ItemTypeMap(models.Model): - code = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True) - value = models.CharField(maxlength=CHAR_MAXLEN, blank=False) - class Admin: - search_fields = ['code', 'value'] - list_display = ('code', 'value') - class Meta: - db_table = 'item_type_map' - ordering = ['code'] - verbose_name = _('Item Type Map') - def __str__(self): - return self.code - - - -class LanguageMap(models.Model): - code = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True) - value = models.CharField(maxlength=CHAR_MAXLEN, blank=False) - class Admin: - search_fields = ['code', 'value'] - list_display = ('code', 'value') - class Meta: - db_table = 'language_map' - ordering = ['code'] - verbose_name = _('Language Map') - def __str__(self): - return self.code - - -class LitFormMap(models.Model): - code = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True) - value = models.CharField(maxlength=CHAR_MAXLEN, blank=False) - description = models.CharField(maxlength=CHAR_MAXLEN) - class Admin: - search_fields = ['code', 'value', 'description'] - list_display = ('code', 'value', 'description') - class Meta: - db_table = 'lit_form_map' - ordering = ['code'] - verbose_name = _('Lit Form Map') - def __str__(self): - return self.code - -class NetAccessLevel(models.Model): - name = models.CharField(maxlength=CHAR_MAXLEN, blank=False) - class Admin: - search_fields = ['name'] - class Meta: - db_table = 'net_access_level' - ordering = ['name'] - verbose_name = _('Net Access Level') - def __str__(self): - return self.name - - -class XmlTransform(models.Model): - name = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True) - namespace_uri = models.CharField(maxlength=CHAR_MAXLEN, blank=False) - prefix = models.CharField(maxlength=CHAR_MAXLEN, blank=False) - xslt = models.CharField(maxlength=CHAR_MAXLEN, blank=False) - class Admin: - search_fields = ['name', 'namespace_uri', 'prefix' ] - list_display = ('name', 'prefix', 'namespace_uri', 'xslt') - class Meta: - db_table = 'xml_transform' - ordering = ['name'] - verbose_name = _('XML Transform') - def __str__(self): - return self.name - - - - - diff --git a/Open-ILS/admin/ils_admin/setup/views.py b/Open-ILS/admin/ils_admin/setup/views.py deleted file mode 100644 index 60f00ef0ef..0000000000 --- a/Open-ILS/admin/ils_admin/setup/views.py +++ /dev/null @@ -1 +0,0 @@ -# Create your views here. diff --git a/Open-ILS/admin/ils_admin/urls.py b/Open-ILS/admin/ils_admin/urls.py deleted file mode 100644 index 016834ddcb..0000000000 --- a/Open-ILS/admin/ils_admin/urls.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.conf.urls.defaults import * - -urlpatterns = patterns('', - ('admin/', include('django.contrib.admin.urls')), -) diff --git a/Open-ILS/src/Makefile.am b/Open-ILS/src/Makefile.am index ad3abff020..a415aff6b6 100644 --- a/Open-ILS/src/Makefile.am +++ b/Open-ILS/src/Makefile.am @@ -32,7 +32,6 @@ examples = @top_srcdir@/Open-ILS/examples jsbackend = @srcdir@/javascript/backend supportscr = @srcdir@/support-scripts webdir = $(WEBDIR) -admindir = $(ADMINDIR) opacjsdir = $(DESTDIR)$(WEBDIR)/opac/common/js jsdojodir = $(DESTDIR)$(WEBDIR)/js/dojo jsdojoosrfdir = $(DESTDIR)$(WEBDIR)/js/dojo/opensrf @@ -193,7 +192,6 @@ uninstall-hook: rm -R $(TEMPLATEDIR) rm -R $(XSLDIR) rm -R $(CGIDIR) - rm -R $(admindir) rm -R $(webdir) rm -R $(opacextrasdir) @@ -233,7 +231,6 @@ webcore-install: mkdir -p $(WEBDIR)/standalone/ mkdir -p $(opacextrasdir) mkdir -p $(XSLDIR) - cp -r @top_srcdir@/Open-ILS/admin/ @localstatedir@ cp -r @top_srcdir@/Open-ILS/web/ @localstatedir@ cp @top_srcdir@/Open-ILS/xsl/*.xsl $(opacextrasdir) cp @top_srcdir@/Open-ILS/xsl/*.xsl $(XSLDIR) @@ -244,7 +241,6 @@ webcore-install: ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/myopac.xml ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/cnbrowse.xml ln -sf $(DESTDIR)@sysconfdir@/fm_IDL.xml $(DESTDIR)$(WEBDIR)/reports/ - sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@localstatedir@/admin/ils_admin/settings.py.example' offline-install: -- 2.43.2