Eco account unit tests
* adds eco account unit tests * adds validity check to eco account form to check on existing deductions and potential conflict with reduced deductable surface * improves geojson handling on SimpleGeomForm * adds/updates translation
This commit is contained in:
@@ -8,10 +8,10 @@ Created on: 15.08.22
|
||||
import json
|
||||
|
||||
from django.contrib.gis import gdal
|
||||
from django.contrib.gis.forms import MultiPolygonField
|
||||
from django.contrib.gis.geos import MultiPolygon, Polygon
|
||||
from django.contrib.gis.geos.prototypes.io import WKTWriter
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.forms import JSONField
|
||||
|
||||
from konova.forms.base_form import BaseForm
|
||||
from konova.models import Geometry
|
||||
@@ -27,8 +27,7 @@ class SimpleGeomForm(BaseForm):
|
||||
"""
|
||||
read_only = True
|
||||
geometry_simplified = False
|
||||
geom = MultiPolygonField(
|
||||
srid=DEFAULT_SRID_RLP,
|
||||
geom = JSONField(
|
||||
label=_("Geometry"),
|
||||
help_text=_(""),
|
||||
label_suffix="",
|
||||
|
||||
Reference in New Issue
Block a user