]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/admin/ils_admin/setup/ils_data/models.py
updating models with (what should be) working display code
[Evergreen.git] / Open-ILS / admin / ils_admin / setup / ils_data / models.py
1 from django.db import models
2 from django.db.models import signals
3 from django.dispatch import dispatcher
4 import datetime
5
6 INTERVAL_HELP_TEXT = _('examples: "1 hour", "14 days", "3 months", "DD:HH:MM:SS.ms"')
7 CHAR_MAXLEN=200 # just provide a sane default
8
9
10 """ --------------------------------------------------------------
11     Permission tables
12     -------------------------------------------------------------- """
13
14
15 class PermList(models.Model):
16     code = models.CharField(maxlength=100)
17     description = models.TextField(blank=True)
18     class Admin:
19         list_display = ('code','description')
20         search_fields = ['code']
21     class Meta:
22         db_table = 'perm_list'
23         ordering = ['code']
24         verbose_name = _('Permission')
25     def __str__(self):
26         return self.code
27
28 class GrpPermMap(models.Model):
29     grp_id = models.ForeignKey('GrpTree', db_column='grp')
30     perm_id = models.ForeignKey(PermList, db_column='perm')
31     depth_id = models.ForeignKey('OrgUnitType', to_field='depth', db_column='depth')
32     grantable = models.BooleanField()
33     class Admin:
34         list_filter = ['grp_id']
35         list_display = ('perm_id', 'grp_id', 'depth_id')
36     class Meta:
37         db_table = 'grp_perm_map'
38         ordering = ['perm_id', 'grp_id']
39         verbose_name = _('Permission Setting')
40     def __str__(self):
41         return str(self.grp_id)+' -> '+str(self.perm_id)
42
43 class GrpTree(models.Model):
44     name = models.CharField(maxlength=100)
45     parent_id = models.ForeignKey('self', null=True, related_name='children', db_column='parent')
46     description = models.CharField(blank=True, maxlength=CHAR_MAXLEN)
47     perm_interval = models.CharField(blank=True, maxlength=100, help_text=INTERVAL_HELP_TEXT)
48     application_perm = models.CharField(blank=True, maxlength=100)
49     usergroup = models.BooleanField()
50     class Admin:
51         list_display = ('name', 'description')
52         list_filter = ['parent_id']
53         search_fields = ['name', 'description']
54     class Meta:
55         db_table = 'grp_tree'
56         ordering = ['name']
57         verbose_name = _('User Group')
58     def __str__(self):
59         return self.name
60
61
62
63
64
65 """ There's no way to do user-based mangling given the size of the data without custom handling.
66       When you try to create a new permission map, it tries to load all users into a dropdown selector :(
67
68 class User(models.Model):
69    card_id = models.ForeignKey('Card', db_column='card')
70    profile_id = models.ForeignKey(GrpTree, db_column='profile')
71    usrname = models.CharField(blank=False, null=False, maxlength=CHAR_MAXLEN)
72    def __str__(self):
73       return "%s (%s)" % ( str(self.card_id), str(self.usrname))
74    class Meta:
75       db_table = 'usr'
76       verbose_name = 'User'
77
78 class UsrPermMap(models.Model):
79    usr_id = models.ForeignKey(User, db_column='usr')
80    perm_id = models.ForeignKey(PermList, db_column='perm')
81    depth_id = models.ForeignKey(OrgUnitType, to_field='depth', db_column='depth')
82    grantable = models.BooleanField()
83    class Admin:
84       search_fields = ['usr_id', 'perm_id']  # we need text fields to search...
85    class Meta:
86       db_table = 'usr_perm_map'
87       verbose_name = 'User Permission'
88    def __str__(self):
89       return "%s -> %s" % ( str(self.usr_id), str(self.perm_id) )
90
91
92 class Card(models.Model):
93    usr_id = models.ForeignKey(User, db_column='usr')
94    barcode = models.CharField(blank=False, null=False, maxlength=CHAR_MAXLEN)
95    active = models.BooleanField()
96    def __str__(self): 
97       return self.barcode
98    class Meta:
99       db_table = 'card'
100       verbose_name = 'Card'
101 """
102
103    
104
105 """ --------------------------------------------------------------
106     Actor tables
107     -------------------------------------------------------------- """
108
109 class OrgUnitType(models.Model):
110     name = models.CharField(maxlength=100)
111     opac_label = models.CharField(maxlength=100)
112     depth = models.IntegerField()
113     parent_id = models.ForeignKey('self', null=True, related_name='children', db_column='parent')
114     can_have_vols = models.BooleanField()
115     can_have_users = models.BooleanField()
116     class Meta:
117         db_table = 'org_unit_type'
118         verbose_name = _('Organizational Unit Type')
119     class Admin:
120         list_display = ('name', 'depth')
121         list_filter = ['parent_id']
122         ordering = ['depth']
123     def __str__(self):
124         return self.name
125
126 class OrgUnitSetting(models.Model):
127     org_unit_id = models.ForeignKey('OrgUnit', db_column='org_unit')
128     name = models.CharField(maxlength=CHAR_MAXLEN)
129     value = models.CharField(maxlength=CHAR_MAXLEN)
130     class Admin:
131         list_display = ('org_unit_id', 'name', 'value')
132         search_fields = ['name', 'value']
133         list_filter = ['name', 'org_unit_id']
134     class Meta:
135         db_table = 'org_unit_setting'
136         ordering = ['org_unit_id', 'name']
137         verbose_name = _('Organizational Unit Setting')
138     def __str__(self):
139         return "%s:%s=%s" % (self.org_unit_id.shortname, self.name, self.value)
140
141
142 class OrgAddress(models.Model):
143     valid = models.BooleanField()
144     org_unit_id = models.ForeignKey('OrgUnit', db_column='org_unit')
145     address_type = models.CharField(blank=False, maxlength=CHAR_MAXLEN, default=_('MAILING'))
146     street1 = models.CharField(blank=False, maxlength=CHAR_MAXLEN)
147     street2 = models.CharField(maxlength=CHAR_MAXLEN)
148     city = models.CharField(blank=False, maxlength=CHAR_MAXLEN)
149     county = models.CharField(maxlength=CHAR_MAXLEN)
150     state = models.CharField(blank=False, maxlength=CHAR_MAXLEN)
151     country = models.CharField(blank=False, maxlength=CHAR_MAXLEN)
152     post_code = models.CharField(blank=False, maxlength=CHAR_MAXLEN)
153     class Admin:
154         search_fields = ['street1', 'city', 'post_code']   
155         list_filter = ['org_unit_id']
156         list_display = ('street1', 'street2', 'city', 'county', 'state', 'post_code')
157     class Meta:
158         ordering = ['city']
159         db_table = 'org_address'
160         verbose_name = _('Organizational Unit Address')
161     def __str__(self):
162         return self.street1+' '+self.city+', '+self.state+' '+self.post_code
163
164 class OrgUnit(models.Model):
165     parent_ou_id = models.ForeignKey('self', null=True, related_name='children', db_column='parent_ou')
166     ou_type_id = models.ForeignKey(OrgUnitType, db_column='ou_type')
167     shortname = models.CharField(maxlength=CHAR_MAXLEN)
168     name = models.CharField(maxlength=CHAR_MAXLEN)
169     email = models.EmailField(null=True, blank=True)
170     phone = models.CharField(maxlength=CHAR_MAXLEN, null=True, blank=True)
171     opac_visible = models.BooleanField(blank=True)
172     ill_address_id = models.ForeignKey(OrgAddress, 
173         db_column='ill_address', related_name='ill_addresses', null=True, blank=True)
174     holds_address_id = models.ForeignKey(OrgAddress, 
175         db_column='holds_address', related_name='holds_addresses', null=True, blank=True)
176     mailing_address_id = models.ForeignKey(OrgAddress, 
177         db_column='mailing_address', related_name='mailing_addresses', null=True, blank=True)
178     billing_address_id = models.ForeignKey(OrgAddress, 
179         db_column='billing_address', related_name='billing_addresses', null=True, blank=True)
180     class Admin:
181         search_fields = ['name', 'shortname']
182         list_display = ('shortname', 'name')
183     class Meta:
184         db_table = 'org_unit'
185         ordering = ['shortname']
186         verbose_name = _('Organizational Unit')
187     def __str__(self):
188         return self.shortname
189
190 class HoursOfOperation(models.Model):
191     #choices = tuple([ (datetime.time(i), str(i)) for i in range(0,23) ])
192     org_unit = models.ForeignKey('OrgUnit', db_column='id')
193     # XXX add better time widget support
194     dow_0_open = models.TimeField(_('Monday Open'), null=False, blank=False, default=datetime.time(9))
195     dow_0_close = models.TimeField(_('Monday Close'), null=False, blank=False, default=datetime.time(17))
196     dow_1_open = models.TimeField(_('Tuesday Open'), null=False, blank=False, default=datetime.time(9))
197     dow_1_close = models.TimeField(_('Tuesday Close'), null=False, blank=False, default=datetime.time(17))
198     dow_2_open = models.TimeField(_('Wednesday Open'), null=False, blank=False, default=datetime.time(9))
199     dow_2_close = models.TimeField(_('Wednesday Close'), null=False, blank=False, default=datetime.time(17))
200     dow_3_open = models.TimeField(_('Thursday Open'), null=False, blank=False, default=datetime.time(9))
201     dow_3_close = models.TimeField(_('Thursday Close'), null=False, blank=False, default=datetime.time(17))
202     dow_4_open = models.TimeField(_('Friday Open'), null=False, blank=False, default=datetime.time(9))
203     dow_4_close = models.TimeField(_('Friday Close'), null=False, blank=False, default=datetime.time(17))
204     dow_5_open = models.TimeField(_('Saturday Open'), null=False, blank=False, default=datetime.time(9))
205     dow_5_close = models.TimeField(_('Saturday Close'), null=False, blank=False, default=datetime.time(17))
206     dow_6_open = models.TimeField(_('Sunday Open'), null=False, blank=False, default=datetime.time(9))
207     dow_6_close = models.TimeField(_('Sunday Close'), null=False, blank=False, default=datetime.time(17))
208     class Admin:
209         pass
210     class Meta:
211         db_table = 'hours_of_operation'
212         verbose_name = _('Hours of Operation')
213         verbose_name_plural = verbose_name
214     def __str__(self):
215         return str(self.org_unit)
216
217
218
219 """ --------------------------------------------------------------
220     Config tables
221     -------------------------------------------------------------- """
222
223 class CircModifier(models.Model):
224     code = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True)
225     name = models.CharField(maxlength=CHAR_MAXLEN)
226     description = models.CharField(maxlength=CHAR_MAXLEN);
227     sip2_media_type = models.CharField(maxlength=CHAR_MAXLEN);
228     magnetic_media = models.BooleanField()
229     class Admin:
230         search_fields = ['name','code']
231         list_display = ('code','name','description','sip2_media_type','magnetic_media')
232     class Meta:
233         db_table = 'circ_modifier'
234         ordering = ['name']
235         verbose_name = _('Circulation Modifier')
236     def __str__(self):
237         return self.name
238
239
240 class VideoRecordingFormat(models.Model):
241     code = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True)
242     value = models.CharField(maxlength=CHAR_MAXLEN, help_text=INTERVAL_HELP_TEXT);
243     class Admin:
244         search_fields = ['value','code']
245         list_display = ('value','code')
246     class Meta:
247         db_table = 'videorecording_format_map'
248         ordering = ['code']
249         verbose_name = _('Video Recording Format')
250     def __str__(self):
251         return self.value
252
253 class RuleCircDuration(models.Model):
254     name = models.CharField(maxlength=CHAR_MAXLEN)
255     extended = models.CharField(maxlength=CHAR_MAXLEN, help_text=INTERVAL_HELP_TEXT);
256     normal = models.CharField(maxlength=CHAR_MAXLEN, help_text=INTERVAL_HELP_TEXT);
257     shrt = models.CharField(maxlength=CHAR_MAXLEN, help_text=INTERVAL_HELP_TEXT);
258     max_renewals = models.IntegerField()
259     class Admin:
260         search_fields = ['name']
261         list_display = ('name','extended','normal','shrt','max_renewals')
262     class Meta:
263         db_table = 'rule_circ_duration'
264         ordering = ['name']
265         verbose_name = _('Circ Duration Rule')
266     def __str__(self):
267         return self.name
268
269 class CircMatrixMatchpoint(models.Model):
270     active = models.BooleanField(blank=False, default=True)
271     org_unit_id = models.ForeignKey(OrgUnit, db_column='org_unit', blank=False)
272     grp_id = models.ForeignKey(GrpTree, db_column='grp', blank=False)
273     circ_modifier_id = models.ForeignKey(CircModifier, db_column='circ_modifier', null=True)
274     marc_type_id = models.ForeignKey('ItemTypeMap', db_column='marc_type', null=True)
275     marc_form_id = models.ForeignKey('ItemFormMap', db_column='marc_form', null=True)
276     marc_vr_format_id = models.ForeignKey('VideoRecordingFormat', db_column='marc_vr_format', null=True)
277     ref_flag = models.BooleanField(null=True)
278     usr_age_lower_bound = models.CharField(maxlength=CHAR_MAXLEN, help_text=INTERVAL_HELP_TEXT, null=True)
279     usr_age_upper_bound = models.CharField(maxlength=CHAR_MAXLEN, help_text=INTERVAL_HELP_TEXT, null=True)
280     class Admin:
281         fields = (
282           (None, {
283             'fields': ('org_unit_id', 'circ_modifier_id', 'marc_type_id', 'marc_form_id','marc_vr_format_id','usr_age_lower_bound','usr_age_upper_bound')
284           }),
285           ('Baseline Test', {
286             'classes': 'collapse',
287             'fields' : ('circmatrixtest_set')
288           }),
289           ('Circ Mod Tests', {
290             'classes': 'collapse',
291             'fields': ('circmatrixcircmodtest_set')
292           }),
293           ('Ruleset', {
294             'classes': 'collapse',
295             'fields': ('circmatrixruleset_set')
296           })
297         )
298         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']
299         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')
300         list_filter = ['grp_id','org_unit_id','circ_modifier_id','marc_type_id','marc_form_id','marc_vr_format_id']
301     class Meta:
302         db_table = 'circ_matrix_matchpoint'
303         ordering = ['id']
304         verbose_name = _('Circulation Matrix Matchpoint')
305     def __str__(self):
306         return _("OrgUnit: %s, Group: %s, Circ Modifier: %s") % (self.org_unit_id, self.grp_id, self.circ_modifier_id)
307
308 class CircMatrixTest(models.Model):
309     matchpoint_id =  models.ForeignKey(CircMatrixMatchpoint, db_column='matchpoint', blank=False, primary_key=True)
310     max_items_out = models.IntegerField(null=True)
311     max_overdue = models.IntegerField(null=True)
312     max_fines = models.FloatField(max_digits=8, decimal_places=2, null=True)
313     script_test = models.CharField(maxlength=CHAR_MAXLEN, null=True)
314     class Admin:
315         list_display = ('matchpoint_id','max_items_out','max_overdue','max_fines','script_test')
316     class Meta:
317         db_table = 'circ_matrix_test'
318         ordering = ['matchpoint_id']
319         verbose_name = _('Circ Matrix Test')
320     def __str__(self):
321         return self.matchpoint_id + _(", Max Items Out: %s, Max Overdue: %s, Max Fines: %s") % (self.max_items_out, self.max_overdue, self.max_fines)
322
323 class CircMatrixCircModTest(models.Model):
324     matchpoint_id =  models.ForeignKey(CircMatrixMatchpoint, db_column='matchpoint', blank=False)
325     items_out = models.IntegerField(blank=False)
326     circ_mod_id = models.ForeignKey(CircModifier, db_column='circ_mod', blank=False)
327     class Admin:
328         search_fields = ['circ_mod_id']
329         list_display = ('matchpoint_id','circ_mod_id','items_out')
330     class Meta:
331         db_table = 'circ_matrix_circ_mod_test'
332         ordering = ['matchpoint_id']
333         verbose_name = _('Circ Matrix Items Out Cirulation Modifier Subtest')
334     def __str__(self):
335         return self.matchpoint_id + _(", Restriction: ") + self.circ_mod_id
336
337 class CircMatrixRuleSet(models.Model):
338     matchpoint_id =  models.ForeignKey(CircMatrixMatchpoint, db_column='matchpoint', blank=False, primary_key=True)
339     duration_rule_id = models.ForeignKey(RuleCircDuration, db_column='duration_rule', blank=False)
340     recurring_fine_rule_id = models.ForeignKey('RuleRecurringFine', db_column='recurring_fine_rule', blank=False)
341     max_fine_rule_id = models.ForeignKey('RuleMaxFine', db_column='max_fine_rule', blank=False)
342     class Admin:
343         search_fields = ['matchoint_id']
344         list_display = ('matchpoint_id','duration_rule_id','recurring_fine_rule_id','max_fine_rule_id')
345     class Meta:
346         db_table = 'circ_matrix_ruleset'
347         ordering = ['matchpoint_id']
348         verbose_name = _('Circ Matrix Rule Set')
349     def __str__(self):
350         return _(", Duration: %s, Recurring Fine: %s, Max Fine: %s") % (self.duration_rule_id, self.recurring_fine_rule_id, self.max_fine_rule_id)
351
352 class RuleMaxFine(models.Model):
353     name = models.CharField(maxlength=CHAR_MAXLEN)
354     amount = models.FloatField(max_digits=6, decimal_places=2)
355     class Admin:
356         search_fields = ['name']
357         list_display = ('name','amount')
358     class Meta:
359         db_table = 'rule_max_fine'
360         ordering = ['name']
361         verbose_name = _('Circ Max Fine Rule')
362     def __str__(self):
363         return self.name
364
365 class RuleRecurringFine(models.Model):
366     name = models.CharField(maxlength=CHAR_MAXLEN)
367     high = models.FloatField(max_digits=6, decimal_places=2)
368     normal = models.FloatField(max_digits=6, decimal_places=2)
369     low = models.FloatField(max_digits=6, decimal_places=2)
370     class Admin:
371         search_fields = ['name']
372         list_display = ('name','high', 'normal', 'low')
373     class Meta:
374         db_table = 'rule_recuring_fine'
375         ordering = ['name']
376         verbose_name = 'Circ Recurring Fine Rule'
377     def __str__(self):
378         return self.name
379
380 class IdentificationType(models.Model):
381     name = models.CharField(maxlength=CHAR_MAXLEN)
382     class Admin:
383         search_fields = ['name']
384     class Meta:
385         db_table = 'identification_type'
386         ordering = ['name']
387         verbose_name = _('Identification Type')
388     def __str__(self):
389         return self.name
390
391
392 class RuleAgeHoldProtect(models.Model):
393     name = models.CharField(maxlength=CHAR_MAXLEN)
394     age = models.CharField(blank=True, maxlength=100, help_text=INTERVAL_HELP_TEXT)
395     prox = models.IntegerField()
396     class Admin:
397         search_fields = ['name']
398     class Meta:
399         db_table = 'rule_age_hold_protect'
400         ordering = ['name']
401         verbose_name = _('Hold Age Protection Rule')
402     def __str__(self):
403         return self.name
404
405
406
407 class MetabibField(models.Model):
408     field_class_choices = (
409         ('title', 'Title'),
410         ('author', 'Author'),
411         ('subject', 'Subject'),
412         ('series', 'Series'),
413         ('keyword', 'Keyword'),
414     )
415     field_class = models.CharField(maxlength=CHAR_MAXLEN, choices=field_class_choices, null=False, blank=False)
416     name = models.CharField(maxlength=CHAR_MAXLEN, null=False, blank=False)
417     xpath = models.TextField(null=False, blank=False)
418     weight = models.IntegerField(null=False, blank=False)
419     format_id = models.ForeignKey('XmlTransform', db_column='format')
420     class Admin:
421         search_fields = ['name', 'field_class', 'format_id']
422         list_display = ('field_class', 'name', 'format_id')
423     class Meta:
424         db_table = 'metabib_field'
425         ordering = ['field_class', 'name']
426         verbose_name = _('Metabib Field')
427     def __str__(self):
428         return self.name
429
430
431 class CopyStatus(models.Model):
432     name = models.CharField(maxlength=CHAR_MAXLEN)
433     holdable = models.BooleanField()
434     class Admin:
435         search_fields = ['name']
436         list_display = ('name', 'holdable')
437     class Meta:
438         db_table = 'copy_status'
439         ordering = ['name']
440         verbose_name= _('Copy Status')
441         verbose_name_plural= _('Copy Statuses')
442     def __str__(self):
443         return self.name
444
445
446 class AudienceMap(models.Model):
447     code = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True)
448     value = models.CharField(maxlength=CHAR_MAXLEN, blank=False)
449     description = models.CharField(maxlength=CHAR_MAXLEN)
450     class Admin:
451         search_fields = ['code', 'value', 'description']
452         list_display = ('code', 'value', 'description')
453     class Meta:
454         db_table = 'audience_map'
455         ordering = ['code']
456         verbose_name = _('Audience Map')
457     def __str__(self):
458         return self.code
459
460
461 class BibSource(models.Model):
462     quality = models.IntegerField()
463     source = models.CharField(maxlength=CHAR_MAXLEN, blank=False)
464     transcendant = models.BooleanField()
465     class Admin:
466         search_fields = ['source']
467         list_display = ('source', 'quality', 'transcendant')
468     class Meta:
469         db_table = 'bib_source'
470         ordering = ['source']
471         verbose_name = _('Bib Source')
472     def __str__(self):
473         return self.source
474
475 class ItemFormMap(models.Model):
476     code = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True)
477     value = models.CharField(maxlength=CHAR_MAXLEN, blank=False)
478     class Admin:
479         search_fields = ['code', 'value']
480         list_display = ('code', 'value')
481     class Meta:
482         db_table = 'item_form_map'
483         ordering = ['code']
484         verbose_name = _('Item Form Map')
485     def __str__(self):
486         return self.code
487
488 class ItemTypeMap(models.Model):
489     code = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True)
490     value = models.CharField(maxlength=CHAR_MAXLEN, blank=False)
491     class Admin:
492         search_fields = ['code', 'value']
493         list_display = ('code', 'value')
494     class Meta:
495         db_table = 'item_type_map'
496         ordering = ['code']
497         verbose_name = _('Item Type Map')
498     def __str__(self):
499         return self.code
500
501
502
503 class LanguageMap(models.Model):
504     code = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True)
505     value = models.CharField(maxlength=CHAR_MAXLEN, blank=False)
506     class Admin:
507         search_fields = ['code', 'value']
508         list_display = ('code', 'value')
509     class Meta:
510         db_table = 'language_map'
511         ordering = ['code']
512         verbose_name = _('Language Map')
513     def __str__(self):
514         return self.code
515
516
517 class LitFormMap(models.Model):
518     code = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True)
519     value = models.CharField(maxlength=CHAR_MAXLEN, blank=False)
520     description = models.CharField(maxlength=CHAR_MAXLEN)
521     class Admin:
522         search_fields = ['code', 'value', 'description']
523         list_display = ('code', 'value', 'description')
524     class Meta:
525         db_table = 'lit_form_map'
526         ordering = ['code']
527         verbose_name = _('Lit Form Map')
528     def __str__(self):
529         return self.code
530
531 class NetAccessLevel(models.Model):
532     name = models.CharField(maxlength=CHAR_MAXLEN, blank=False)
533     class Admin:
534         search_fields = ['name']
535     class Meta:
536         db_table = 'net_access_level'
537         ordering = ['name']
538         verbose_name = _('Net Access Level')
539     def __str__(self):
540         return self.name
541
542
543 class XmlTransform(models.Model):
544     name = models.CharField(maxlength=CHAR_MAXLEN, blank=False, primary_key=True)
545     namespace_uri = models.CharField(maxlength=CHAR_MAXLEN, blank=False)
546     prefix = models.CharField(maxlength=CHAR_MAXLEN, blank=False)
547     xslt = models.CharField(maxlength=CHAR_MAXLEN, blank=False)
548     class Admin:
549         search_fields = ['name', 'namespace_uri', 'prefix' ]
550         list_display = ('name', 'prefix', 'namespace_uri', 'xslt')
551     class Meta:
552         db_table = 'xml_transform'
553         ordering = ['name']
554         verbose_name = _('XML Transform')
555     def __str__(self):
556         return self.name
557
558
559
560
561