from telemeta.models.core import *
from django.utils.translation import ugettext_lazy as _
from django.contrib.contenttypes import generic
-from notes.models import Note
class Enumeration(ModelCore):
class PhysicalFormat(Enumeration):
"Collection physical format"
- notes = generic.GenericRelation(Note)
-
class Meta(MetaEnumeration):
db_table = 'physical_formats'
verbose_name = _("archive format")
class PublishingStatus(Enumeration):
"Collection publishing status"
- notes = generic.GenericRelation(Note)
-
class Meta(MetaEnumeration):
db_table = 'publishing_status'
verbose_name = _("secondary edition")
class AcquisitionMode(Enumeration):
"Mode of acquisition of the collection"
- notes = generic.GenericRelation(Note)
-
class Meta(MetaEnumeration):
db_table = 'acquisition_modes'
verbose_name = _("mode of acquisition")
class MetadataAuthor(Enumeration):
"Collection metadata author"
-
- notes = generic.GenericRelation(Note)
+
class Meta(MetaEnumeration):
db_table = 'metadata_authors'
class MetadataWriter(Enumeration):
"Collection metadata writer"
- notes = generic.GenericRelation(Note)
-
class Meta(MetaEnumeration):
db_table = 'metadata_writers'
verbose_name = _("record writer")
class LegalRight(Enumeration):
"Collection legal rights"
- notes = generic.GenericRelation(Note)
-
class Meta(MetaEnumeration):
db_table = 'legal_rights'
verbose_name = _("legal rights")
class RecordingContext(Enumeration):
"Collection recording context"
- notes = generic.GenericRelation(Note)
-
class Meta(MetaEnumeration):
db_table = 'recording_contexts'
verbose_name = _("recording context")
class AdConversion(Enumeration):
"Collection digital to analog conversion status"
- notes = generic.GenericRelation(Note)
-
class Meta(MetaEnumeration):
db_table = 'ad_conversions'
verbose_name = _("A/D conversion")
class VernacularStyle(Enumeration):
"Item vernacular style"
- notes = generic.GenericRelation(Note)
-
class Meta(MetaEnumeration):
db_table = 'vernacular_styles'
verbose_name = _("vernacular style")
class GenericStyle(Enumeration):
"Item generic style"
- notes = generic.GenericRelation(Note)
-
class Meta(MetaEnumeration):
db_table = 'generic_styles'
verbose_name = _("generic style")
class ContextKeyword(Enumeration):
"Keyword"
- notes = generic.GenericRelation(Note)
-
class Meta(MetaEnumeration):
db_table = 'context_keywords'
verbose_name = _("keyword")
class Publisher(Enumeration):
"Collection publisher"
- notes = generic.GenericRelation(Note)
-
class Meta(MetaEnumeration):
db_table = 'publishers'
verbose_name = _("publisher / status")
publisher = ForeignKey('Publisher', related_name="publisher_collections", verbose_name=_('publisher'))
value = CharField(_('value'), required=True)
- notes = generic.GenericRelation(Note)
-
+
def __unicode__(self):
return self.value
class EthnicGroup(Enumeration):
"Item ethnic group"
- notes = generic.GenericRelation(Note)
-
class Meta(MetaEnumeration):
db_table = 'ethnic_groups'
verbose_name = _('population / social group')
ethnic_group = ForeignKey('EthnicGroup', related_name="aliases", verbose_name=_('population / social group'))
value = CharField(_('name'), required=True)
- notes = generic.GenericRelation(Note)
-
+
class Meta(MetaCore):
db_table = 'ethnic_group_aliases'
unique_together = (('ethnic_group', 'value'),)