diff --git a/xgds_sample/defaultSettings.py b/xgds_sample/defaultSettings.py index ba7ee21..ad8b4a9 100644 --- a/xgds_sample/defaultSettings.py +++ b/xgds_sample/defaultSettings.py @@ -64,3 +64,4 @@ XGDS_DATA_EXPAND_RELATED = getOrCreateDict('XGDS_DATA_EXPAND_RELATED') XGDS_DATA_EXPAND_RELATED['xgds_sample'] = {'AbstractSample': [('place', 'site', 'Site')]} +XGDS_SAMPLE_SAMPLE_CHANNEL = 'sample' \ No newline at end of file diff --git a/xgds_sample/models.py b/xgds_sample/models.py index 4cf8160..b00b71d 100644 --- a/xgds_sample/models.py +++ b/xgds_sample/models.py @@ -26,7 +26,7 @@ from django.contrib.auth.models import User from django.urls import reverse -from xgds_core.models import SearchableModel, IsFlightChild, IsFlightData +from xgds_core.models import SearchableModel, IsFlightChild, IsFlightData, BroadcastMixin from xgds_notes2.models import NoteMixin, NoteLinksMixin, DEFAULT_NOTES_GENERIC_RELATION from geocamUtil.loader import LazyGetModelByName @@ -88,7 +88,8 @@ class Meta: verbose_name=settings.XGDS_CORE_FLIGHT_MONIKER, blank=True, null=True) -class AbstractSample(models.Model, SearchableModel, IsFlightChild, IsFlightData, NoteMixin, NoteLinksMixin): +class AbstractSample(models.Model, SearchableModel, IsFlightChild, IsFlightData, NoteMixin, NoteLinksMixin, + BroadcastMixin): name = models.CharField(max_length=64, null=True, blank=True, db_index=True) # 9 characters sample_type = models.ForeignKey(SampleType, null=True) place = models.ForeignKey(Place, null=True, verbose_name=settings.XGDS_MAP_SERVER_PLACE_MONIKER) @@ -154,6 +155,9 @@ def cls_type(cls): @property def type(self): return self.__class__.cls_type() + + def getSseType(self): + return settings.XGDS_SAMPLE_SAMPLE_CHANNEL @classmethod def timesearchField(self):