diff options
Diffstat (limited to 'ishtar_common/models.py')
| -rw-r--r-- | ishtar_common/models.py | 21 | 
1 files changed, 21 insertions, 0 deletions
| diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 2845b7c1c..a89a32991 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1148,9 +1148,25 @@ class SourceType(GeneralType):          verbose_name = _(u"Source type")          verbose_name_plural = _(u"Source types") +class SupportType(GeneralType): +    class Meta: +        verbose_name = _(u"Support type") +        verbose_name_plural = _(u"Support types") + +class Format(GeneralType): +    class Meta: +        verbose_name = _(u"Format") +        verbose_name_plural = _(u"Formats") +  class Source(models.Model):      title = models.CharField(_(u"Title"), max_length=300)      source_type = models.ForeignKey(SourceType, verbose_name=_(u"Type")) +    support_type = models.ForeignKey(SupportType, verbose_name=_(u"Support"), +                                     blank=True, null=True,) +    format_type = models.ForeignKey(Format, verbose_name=_(u"Format"), +                                     blank=True, null=True,) +    scale = models.CharField(_(u"Scale"), max_length=30, null=True, +                             blank=True)      authors = models.ManyToManyField(Author, verbose_name=_(u"Authors"),                                   related_name="%(class)s_related")      associated_url = models.URLField(verify_exists=False, blank=True, null=True, @@ -1159,10 +1175,15 @@ class Source(models.Model):                                      verbose_name=_(u"Receipt date"))      creation_date = models.DateField(blank=True, null=True,                                      verbose_name=_(u"Creation date")) +    item_number = models.IntegerField(_(u"Item number"), default=1)      reference = models.CharField(_(u"Ref."), max_length=25, null=True,                                   blank=True)      internal_reference = models.CharField(_(u"Internal reference"),                                            max_length=25, null=True, blank=True) +    description = models.TextField(_(u"Description"), blank=True, null=True) +    comment = models.TextField(_(u"Comment"), blank=True, null=True) +    additional_information = models.TextField(_(u"Additional information"), +                                              blank=True, null=True)      TABLE_COLS = ['title', 'source_type', 'authors',]      class Meta: | 
