diff options
Diffstat (limited to 'ishtar_common/models_common.py')
-rw-r--r-- | ishtar_common/models_common.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py index b2cb095e6..238bbeeac 100644 --- a/ishtar_common/models_common.py +++ b/ishtar_common/models_common.py @@ -2079,6 +2079,18 @@ class GeoProviderType(HierarchicalType): ) +class GeoBufferType(GeneralType): + order = models.IntegerField(_("Order"), default=10) + + class Meta: + verbose_name = _("Geographic - Buffer type") + verbose_name_plural = _("Geographic - Buffer types") + ordering = ( + "order", + "label", + ) + + GEOJSON_POINT_TPL = { "type": "FeatureCollection", "features": [ @@ -2115,6 +2127,12 @@ class GeoVectorData(Imported, OwnPerms): "related_items_archaeological_warehouse_container", ] + buffer = models.FloatField( + _("Buffer"), blank=True, null=True + ) + buffer_type = models.ForeignKey(GeoBufferType, blank=True, null=True, + on_delete=models.CASCADE) + need_update = models.BooleanField(_("Need update"), default=False) name = models.TextField(_("Name"), default="-") source_content_type = models.ForeignKey( ContentType, related_name="content_type_geovectordata", on_delete=models.CASCADE @@ -2177,7 +2195,6 @@ class GeoVectorData(Imported, OwnPerms): multi_points = models.MultiPointField(_("Multi points"), blank=True, null=True) multi_line = models.MultiLineStringField(_("Multi lines"), blank=True, null=True) multi_polygon = models.MultiPolygonField(_("Multi polygons"), blank=True, null=True) - need_update = models.BooleanField(_("Need update"), default=False) class Meta: verbose_name = _("Geographic - Vector data") |