diff options
Diffstat (limited to 'archaeological_finds/models_finds.py')
| -rw-r--r-- | archaeological_finds/models_finds.py | 16 | 
1 files changed, 16 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index e1c866f9d..34e3c4f87 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -89,6 +89,8 @@ class TreatmentType(GeneralType):          verbose_name = _(u"Treatment type")          verbose_name_plural = _(u"Treatment types")          ordering = ('label',) + +  post_save.connect(post_save_cache, sender=TreatmentType)  post_delete.connect(post_save_cache, sender=TreatmentType) @@ -171,6 +173,17 @@ post_save.connect(post_save_cache, sender=TreatmentEmergencyType)  post_delete.connect(post_save_cache, sender=TreatmentEmergencyType) +class CommunicabilityType(HierarchicalType): +    class Meta: +        verbose_name = _(u"Communicability type") +        verbose_name_plural = _(u"Communicability types") +        ordering = ('parent__label', 'label',) + + +post_save.connect(post_save_cache, sender=CommunicabilityType) +post_delete.connect(post_save_cache, sender=CommunicabilityType) + +  class BFBulkView(object):      CREATE_SQL = """          CREATE VIEW basefind_cached_bulk_update @@ -699,6 +712,9 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, ImageModel,      remarkabilities = models.ManyToManyField(          RemarkabilityType, verbose_name=_(u"Remarkability"),          related_name='find', blank=True) +    communicabilities = models.ManyToManyField( +        CommunicabilityType, verbose_name=_(u"Communicability"), +        related_name='find', blank=True)      min_number_of_individuals = models.IntegerField(          _(u"Minimum number of individuals (MNI)"), blank=True, null=True)      length = models.FloatField(_(u"Length (cm)"), blank=True, null=True)  | 
