Skip to content

Commit

Permalink
sample has broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
tamarmot committed Mar 20, 2019
1 parent e2d2e2f commit 9472d8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions xgds_sample/defaultSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
8 changes: 6 additions & 2 deletions xgds_sample/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 9472d8e

Please sign in to comment.