diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-09-03 12:41:59 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-09-03 12:41:59 +0200 |
commit | 9554264a2acccf88ee89cb89f20eb7bce967a561 (patch) | |
tree | a970e10861234de83f8dbe104a86a8323f7fa787 /archaeological_operations/models.py | |
parent | ba05d1376890231994a6eb4d904083359282c726 (diff) | |
download | Ishtar-9554264a2acccf88ee89cb89f20eb7bce967a561.tar.bz2 Ishtar-9554264a2acccf88ee89cb89f20eb7bce967a561.zip |
Manage history for sites
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 34e2e4716..42f1775df 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -98,7 +98,8 @@ post_save.connect(post_save_cache, sender=RecordQualityType) post_delete.connect(post_save_cache, sender=RecordQualityType) -class ArchaeologicalSite(BaseHistorizedItem): +class ArchaeologicalSite(BaseHistorizedItem, OwnPerms, ValueGetter, + ShortMenuItem): SHOW_URL = 'show-site' TABLE_COLS = ['reference', 'name', 'towns_label', 'periods', 'remains'] SLUG = 'site' @@ -216,12 +217,19 @@ class ArchaeologicalSite(BaseHistorizedItem): discovery_area = models.TextField( _(u"Discovery area"), null=True, blank=True) + # gis + point = models.PointField(_(u"Point"), blank=True, null=True) + multi_polygon = models.MultiPolygonField(_(u"Multi polygon"), blank=True, + null=True) + documents = models.ManyToManyField( Document, related_name="sites", verbose_name=_(u"Documents"), blank=True) cached_label = models.TextField(_(u"Cached name"), null=True, blank=True, db_index=True) + history = HistoricalRecords() + class Meta: verbose_name = _(u"Archaeological site") verbose_name_plural = _(u"Archaeological sites") |