[open-ils-commits] r7709 -
branches/rel_1_2/Open-ILS/admin/ils_admin/setup/ils_data
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Aug 21 09:13:51 EDT 2007
Author: erickson
Date: 2007-08-21 09:09:02 -0400 (Tue, 21 Aug 2007)
New Revision: 7709
Modified:
branches/rel_1_2/Open-ILS/admin/ils_admin/setup/ils_data/models.py
Log:
backporting some model fixes from trunk, in particular the format_id xmltransform fix and replacing a raw string with the django i18n wrapper
Modified: branches/rel_1_2/Open-ILS/admin/ils_admin/setup/ils_data/models.py
===================================================================
--- branches/rel_1_2/Open-ILS/admin/ils_admin/setup/ils_data/models.py 2007-08-21 00:34:00 UTC (rev 7708)
+++ branches/rel_1_2/Open-ILS/admin/ils_admin/setup/ils_data/models.py 2007-08-21 13:09:02 UTC (rev 7709)
@@ -6,10 +6,6 @@
CHAR_MAXLEN=200 # just provide a sane default
-#PG_SCHEMAS = "actor, permission, public, config"
-
-
-
""" --------------------------------------------------------------
Permission tables
-------------------------------------------------------------- """
@@ -34,7 +30,7 @@
class PermList(models.Model):
code = models.CharField(maxlength=100)
- description = models.CharField(blank=True, maxlength=CHAR_MAXLEN)
+ description = models.TextField(blank=True)
class Admin:
list_display = ('code','description')
search_fields = ['code']
@@ -143,7 +139,7 @@
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')
+ 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)
@@ -278,10 +274,10 @@
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 = models.ForeignKey('XmlTransform')
+ format_id = models.ForeignKey('XmlTransform', db_column='format')
class Admin:
- search_fields = ['name', 'format', 'field_class']
- list_display = ('field_class', 'name', 'format')
+ search_fields = ['name', 'field_class', 'format_id']
+ list_display = ('field_class', 'name', 'format_id')
class Meta:
db_table = 'metabib_field'
ordering = ['field_class', 'name']
@@ -419,3 +415,5 @@
+
+
More information about the open-ils-commits
mailing list