From e2d2e2f94a56e51e412240db414f22c33f1ff8be Mon Sep 17 00:00:00 2001 From: Tamar Cohen Date: Thu, 7 Feb 2019 08:47:13 -0800 Subject: [PATCH] sample now has notes --- xgds_sample/models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xgds_sample/models.py b/xgds_sample/models.py index 924fc5d..4cf8160 100644 --- a/xgds_sample/models.py +++ b/xgds_sample/models.py @@ -27,6 +27,8 @@ from django.urls import reverse from xgds_core.models import SearchableModel, IsFlightChild, IsFlightData +from xgds_notes2.models import NoteMixin, NoteLinksMixin, DEFAULT_NOTES_GENERIC_RELATION + from geocamUtil.loader import LazyGetModelByName from geocamUtil.models.ExtrasDotField import ExtrasDotField @@ -86,7 +88,7 @@ class Meta: verbose_name=settings.XGDS_CORE_FLIGHT_MONIKER, blank=True, null=True) -class AbstractSample(models.Model, SearchableModel, IsFlightChild, IsFlightData): +class AbstractSample(models.Model, SearchableModel, IsFlightChild, IsFlightData, NoteMixin, NoteLinksMixin): 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) @@ -389,3 +391,5 @@ class Sample(AbstractSample): track_position = DEFAULT_TRACK_POSITION_FIELD() user_position = DEFAULT_USER_POSITION_FIELD() flight = DEFAULT_FLIGHT_FIELD() + notes = DEFAULT_NOTES_GENERIC_RELATION() +