diff --git a/compensation/autocomplete/eco_account.py b/compensation/autocomplete/eco_account.py
index d1ea90f4..4e506815 100644
--- a/compensation/autocomplete/eco_account.py
+++ b/compensation/autocomplete/eco_account.py
@@ -32,3 +32,9 @@ class EcoAccountAutocomplete(Select2QuerySetView):
Q(title__icontains=self.q)
).distinct()
return qs
+
+ def get_result_label(self, result):
+ return str(result)
+
+ def get_selected_result_label(self, result):
+ return str(result)
diff --git a/compensation/forms/modals/state.py b/compensation/forms/modals/state.py
index f0c42213..5a1dde55 100644
--- a/compensation/forms/modals/state.py
+++ b/compensation/forms/modals/state.py
@@ -5,7 +5,7 @@ Contact: ksp-servicestelle@sgdnord.rlp.de
Created on: 18.08.22
"""
-from bootstrap_modal_forms.utils import is_ajax
+from bootstrap_modal_forms.mixins import is_ajax
from dal import autocomplete
from django import forms
from django.contrib import messages
diff --git a/intervention/autocomplete/intervention.py b/intervention/autocomplete/intervention.py
index 961c9660..fdadc471 100644
--- a/intervention/autocomplete/intervention.py
+++ b/intervention/autocomplete/intervention.py
@@ -34,3 +34,9 @@ class InterventionAutocomplete(Select2QuerySetView):
Q(title__icontains=self.q)
).distinct()
return qs
+
+ def get_result_label(self, result):
+ return str(result)
+
+ def get_selected_result_label(self, result):
+ return str(result)
diff --git a/konova/decorators.py b/konova/decorators.py
index cbf45dc4..47df9b2f 100644
--- a/konova/decorators.py
+++ b/konova/decorators.py
@@ -8,7 +8,7 @@ Created on: 16.11.20
from functools import wraps
-from bootstrap_modal_forms.utils import is_ajax
+from bootstrap_modal_forms.mixins import is_ajax
from django.contrib import messages
from django.shortcuts import redirect, get_object_or_404, render
from django.urls import reverse
diff --git a/konova/forms/modals/base_form.py b/konova/forms/modals/base_form.py
index a6806578..96539cf9 100644
--- a/konova/forms/modals/base_form.py
+++ b/konova/forms/modals/base_form.py
@@ -6,7 +6,7 @@ Created on: 15.08.22
"""
from bootstrap_modal_forms.forms import BSModalForm
-from bootstrap_modal_forms.utils import is_ajax
+from bootstrap_modal_forms.mixins import is_ajax
from django.contrib import messages
from django.http import HttpResponseRedirect, HttpRequest
from django.shortcuts import render
diff --git a/konova/models/object.py b/konova/models/object.py
index c7eb15c2..52732a8c 100644
--- a/konova/models/object.py
+++ b/konova/models/object.py
@@ -711,7 +711,11 @@ class GeoReferencedMixin(models.Model):
Returns:
"""
- entry_has_geometry = not self.geometry.geom.empty
+ try:
+ entry_has_geometry = not self.geometry.geom.empty
+ except AttributeError:
+ entry_has_geometry = False
+
if entry_has_geometry:
link = LANIS_LINK_TEMPLATE.format(
self.get_lanis_layer_name(),
diff --git a/konova/sub_settings/django_settings.py b/konova/sub_settings/django_settings.py
index 746df289..906cafee 100644
--- a/konova/sub_settings/django_settings.py
+++ b/konova/sub_settings/django_settings.py
@@ -42,6 +42,10 @@ ALLOWED_HOSTS = [
"localhost",
]
+CSRF_TRUSTED_ORIGINS = [
+ "http://localhost", # not only host but schema (http/s) as well!
+]
+
# Authentication settings
LOGIN_URL = "/login/"
diff --git a/requirements.txt b/requirements.txt
index 79a479ed..db28d0d7 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,51 +1,56 @@
-amqp==5.0.9
-asgiref==3.3.1
-beautifulsoup4==4.9.3
-billiard==3.6.4.0
+amqp==5.1.1
+asgiref==3.7.2
+async-timeout==4.0.3
+beautifulsoup4==4.12.2
+billiard==4.1.0
cached-property==1.5.2
-celery==5.2.3
-certifi==2020.11.8
-chardet==3.0.4
-click==8.0.3
+celery==5.3.4
+certifi==2023.7.22
+chardet==5.2.0
+charset-normalizer==3.3.0
+click==8.1.7
click-didyoumean==0.3.0
click-plugins==1.1.1
-click-repl==0.2.0
-Deprecated==1.2.13
-Django==3.1.3
-django-autocomplete-light==3.9.0rc5
-django-bootstrap-modal-forms==2.2.0
-django-bootstrap4==3.0.1
-django-debug-toolbar==3.1.1
-django-filter==2.4.0
+click-repl==0.3.0
+coverage==7.3.2
+Deprecated==1.2.14
+Django==4.2.6
+django-autocomplete-light==3.10.0rc4
+django-bootstrap-modal-forms==3.0.4
+django-bootstrap4==23.2
+django-debug-toolbar==4.2.0
+django-filter==23.3
django-fontawesome-5==1.0.18
-django-simple-sso==1.1.0
-django-tables2==2.3.4
+django-simple-sso==1.2.0
+django-tables2==2.6.0
et-xmlfile==1.1.0
-idna==2.10
-importlib-metadata==2.1.1
-itsdangerous==0.24
-kombu==5.2.3
-openpyxl==3.0.9
-OWSLib==0.25.0
-packaging==21.3
-pika==1.2.0
-prompt-toolkit==3.0.24
-psycopg2-binary==2.9.1
-pyparsing==3.0.6
-pyproj==3.2.1
+idna==3.4
+importlib-metadata==6.8.0
+itsdangerous<1.0.0
+kombu==5.3.2
+openpyxl==3.2.0b1
+packaging==23.2
+pika==1.3.2
+prompt-toolkit==3.0.39
+psycopg2-binary==2.9.9
+pyparsing==3.1.1
+pypng==0.20220715.0
+pyproj==3.6.1
python-dateutil==2.8.2
-pytz==2021.3
-PyYAML==6.0
-qrcode==7.3.1
-redis==4.1.0
-requests==2.25.0
-six==1.15.0
-soupsieve==2.2.1
-sqlparse==0.4.1
-urllib3==1.26.2
+pytz==2023.3.post1
+PyYAML==6.0.1
+qrcode==7.4.2
+redis==5.0.1
+requests==2.31.0
+six==1.16.0
+soupsieve==2.5
+sqlparse==0.4.4
+typing_extensions==4.8.0
+tzdata==2023.3
+urllib3==2.0.6
vine==5.0.0
-wcwidth==0.2.5
+wcwidth==0.2.8
webservices==0.7
-wrapt==1.13.3
-xmltodict==0.12.0
-zipp==3.4.1
\ No newline at end of file
+wrapt==1.16.0rc1
+xmltodict==0.13.0
+zipp==3.17.0
diff --git a/templates/map/client/config.json b/templates/map/client/config.json
index 5b8bf6cf..b55279e4 100644
--- a/templates/map/client/config.json
+++ b/templates/map/client/config.json
@@ -45,7 +45,6 @@
{ "folder": 13, "type": "WMS", "title": "farbig", "attribution": "LVermGeo", "url": "https://geo4.service24.rlp.de/wms/dtk5_rp.fcgi?", "name": "rp_dtk5", "active": false },
{ "folder": 13, "type": "WMS", "title": "grau", "attribution": "LVermGeo", "url": "https://geo4.service24.rlp.de/wms/dtk5_rp.fcgi?", "name": "rp_dtk5_grau", "active": false }
],
-
"folders":
[
{ "title": "Hintergrund", "parent": -1 },
@@ -65,7 +64,6 @@
{ "title": "BaseMap", "parent": 0 },
{ "title": "Webatlas", "parent": 0 }
],
-
"projections":
[
[ "EPSG:25832", "+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs" ]
@@ -78,7 +76,8 @@
"minZoom": 5,
"maxZoom": 22,
"zoom": 9,
- "attribution": "LANIS RLP"
+ "attribution": "LANIS RLP",
+ "scalebar": true
},
"output":
@@ -94,9 +93,23 @@
"searchParcel":
{
"nameURL": "/client/proxy?https://geodaten.naturschutz.rlp.de/kartendienste_naturschutz/mod_alkis/gem_search.php?placename={q}",
- "parcelURL": "/client/proxy?https://geodaten.naturschutz.rlp.de/kartendienste_naturschutz/mod_alkis/flur_search.php?gmk_gmn={district}&fln={field}&fsn_zae={parcelA}&fsn_nen={parcelB}&export=json"
+ "parcelURL": "/client/proxy?https://geodaten.naturschutz.rlp.de/kartendienste_naturschutz/mod_alkis/flur_search.php?gmk_gmn={district}&fln={field}&fsn_zae={parcelA}&fsn_nen={parcelB}&export=json",
+ "districts_service":
+ {
+ "type": "WFS",
+ "url": "http://geo5.service24.rlp.de/wfs/verwaltungsgrenzen_rp.fcgi?",
+ "name": "vermkv:gemarkungen_rlp",
+ "order": 10,
+ "minZoom": 11,
+ "maxZoom": 17
+ },
+ "fields_service":
+ {
+ "url": "http://geo5.service24.rlp.de/wfs/verwaltungsgrenzen_rp.fcgi?",
+ "name": "vermkv:fluren_rlp",
+ "filter_property": "gmkgnr"
+ }
},
-
"import":
{
"geopackageLibURL": "/libs/geopackage/4.2.3/"
@@ -108,7 +121,6 @@
"defaultFilename": "Export",
"defaultMargin": 10
},
-
"tools":
{
"buffer":
@@ -117,7 +129,6 @@
"defaultSegments": 2
}
},
-
"styles":
{
"editLayer":
@@ -127,7 +138,6 @@
"strokeWidth": 3,
"pointRadius": 6
},
-
"select":
{
"fill": "rgba( 0, 127, 255, 0.5 )",
@@ -135,7 +145,6 @@
"strokeWidth": 3,
"pointRadius": 6
},
-
"sketch":
{
"fill": "rgba( 0, 127, 255, 0.2 )",
@@ -143,7 +152,6 @@
"strokeWidth": 3,
"pointRadius": 6
},
-
"modify":
{
"fill": "rgba( 0, 127, 255, 0.5 )",
@@ -151,12 +159,17 @@
"strokeWidth": 3,
"pointRadius": 6
},
-
"parcel":
{
"fill": "rgba( 127, 255, 255, 0.5 )",
"stroke": "#7fffff",
"strokeWidth": 3
+ },
+ "import":
+ {
+ "fill": "rgba( 0, 127, 255, 0.2 )",
+ "stroke": "rgba( 0, 127, 255, 1.0 )",
+ "width": 1.5
}
}
}
\ No newline at end of file
diff --git a/templates/map/client/index.html b/templates/map/client/index.html
index 9d77addc..b45b77db 100644
--- a/templates/map/client/index.html
+++ b/templates/map/client/index.html
@@ -1,59 +1,34 @@
{% load static %}
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+