From 2a9e57e6335a3c7d4d22f649e3f60e0640587b0c Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Thu, 12 Oct 2023 09:57:05 +0200 Subject: [PATCH 01/10] Django 4.2 * updates Django to 4.x and other packages (if possible) to latest versions * Attention: Requires postgresql >= 12.0 * updates code fragments to match requirements of newer package versions --- compensation/forms/modals/state.py | 2 +- intervention/autocomplete/intervention.py | 6 ++ konova/decorators.py | 2 +- konova/forms/modals/base_form.py | 2 +- requirements.txt | 91 ++++++++++++----------- user/autocomplete/share.py | 11 +++ user/autocomplete/team.py | 5 ++ 7 files changed, 73 insertions(+), 46 deletions(-) diff --git a/compensation/forms/modals/state.py b/compensation/forms/modals/state.py index f0c4221..5a1dde5 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 961c966..fdadc47 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 cbf45dc..47df9b2 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 a680657..96539cf 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/requirements.txt b/requirements.txt index 79a479e..db28d0d 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/user/autocomplete/share.py b/user/autocomplete/share.py index 9331873..215e32c 100644 --- a/user/autocomplete/share.py +++ b/user/autocomplete/share.py @@ -29,6 +29,12 @@ class ShareUserAutocomplete(Select2QuerySetView): qs = qs.order_by("username") return qs + def get_result_label(self, result): + return str(result) + + def get_selected_result_label(self, result): + return str(result) + class ShareTeamAutocomplete(Select2QuerySetView): """ Autocomplete for share with teams @@ -52,3 +58,8 @@ class ShareTeamAutocomplete(Select2QuerySetView): ) return qs + def get_result_label(self, result): + return str(result) + + def get_selected_result_label(self, result): + return str(result) diff --git a/user/autocomplete/team.py b/user/autocomplete/team.py index c78053c..9cd9dc9 100644 --- a/user/autocomplete/team.py +++ b/user/autocomplete/team.py @@ -32,3 +32,8 @@ class TeamAdminAutocomplete(Select2QuerySetView): ) return qs + def get_result_label(self, result): + return str(result) + + def get_selected_result_label(self, result): + return str(result) From 02e8cfc76d16bbbad4f89d3541828b1463f1848d Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Mon, 16 Oct 2023 13:27:27 +0200 Subject: [PATCH 02/10] # Map client update * updates netgis map client to newest pre-release --- templates/map/client/config.json | 29 +- templates/map/client/index.html | 67 +- .../map/client/libs/netgis/Attribution.css | 11 - .../map/client/libs/netgis/Attribution.js | 86 - templates/map/client/libs/netgis/Client.css | 47 - templates/map/client/libs/netgis/Client.js | 304 --- templates/map/client/libs/netgis/Controls.css | 59 - templates/map/client/libs/netgis/Controls.js | 59 - templates/map/client/libs/netgis/Events.js | 81 - .../map/client/libs/netgis/LayerTree.css | 183 -- templates/map/client/libs/netgis/LayerTree.js | 475 ---- .../map/client/libs/netgis/LayerTypes.js | 14 - templates/map/client/libs/netgis/Map.css | 102 - templates/map/client/libs/netgis/Map.js | 20 - .../map/client/libs/netgis/MapOpenLayers.js | 2321 ----------------- templates/map/client/libs/netgis/Menu.css | 118 - templates/map/client/libs/netgis/Menu.js | 261 -- templates/map/client/libs/netgis/Modal.css | 161 -- templates/map/client/libs/netgis/Modal.js | 1020 -------- templates/map/client/libs/netgis/Modes.js | 27 - templates/map/client/libs/netgis/OWS.js | 237 -- templates/map/client/libs/netgis/SLD.js | 79 - .../map/client/libs/netgis/SearchParcel.css | 131 - .../map/client/libs/netgis/SearchParcel.js | 428 --- .../map/client/libs/netgis/SearchPlace.js | 59 - templates/map/client/libs/netgis/Theme.css | 69 - templates/map/client/libs/netgis/Toolbar.css | 139 - templates/map/client/libs/netgis/Toolbar.js | 564 ---- templates/map/client/libs/netgis/Util.js | 217 -- templates/map/client/netgis.min.css | 2 +- templates/map/client/netgis.min.js | 350 ++- 31 files changed, 267 insertions(+), 7453 deletions(-) delete mode 100644 templates/map/client/libs/netgis/Attribution.css delete mode 100644 templates/map/client/libs/netgis/Attribution.js delete mode 100644 templates/map/client/libs/netgis/Client.css delete mode 100644 templates/map/client/libs/netgis/Client.js delete mode 100644 templates/map/client/libs/netgis/Controls.css delete mode 100644 templates/map/client/libs/netgis/Controls.js delete mode 100644 templates/map/client/libs/netgis/Events.js delete mode 100644 templates/map/client/libs/netgis/LayerTree.css delete mode 100644 templates/map/client/libs/netgis/LayerTree.js delete mode 100644 templates/map/client/libs/netgis/LayerTypes.js delete mode 100644 templates/map/client/libs/netgis/Map.css delete mode 100644 templates/map/client/libs/netgis/Map.js delete mode 100644 templates/map/client/libs/netgis/MapOpenLayers.js delete mode 100644 templates/map/client/libs/netgis/Menu.css delete mode 100644 templates/map/client/libs/netgis/Menu.js delete mode 100644 templates/map/client/libs/netgis/Modal.css delete mode 100644 templates/map/client/libs/netgis/Modal.js delete mode 100644 templates/map/client/libs/netgis/Modes.js delete mode 100644 templates/map/client/libs/netgis/OWS.js delete mode 100644 templates/map/client/libs/netgis/SLD.js delete mode 100644 templates/map/client/libs/netgis/SearchParcel.css delete mode 100644 templates/map/client/libs/netgis/SearchParcel.js delete mode 100644 templates/map/client/libs/netgis/SearchPlace.js delete mode 100644 templates/map/client/libs/netgis/Theme.css delete mode 100644 templates/map/client/libs/netgis/Toolbar.css delete mode 100644 templates/map/client/libs/netgis/Toolbar.js delete mode 100644 templates/map/client/libs/netgis/Util.js diff --git a/templates/map/client/config.json b/templates/map/client/config.json index 5b8bf6c..8ef4f35 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,7 +159,6 @@ "strokeWidth": 3, "pointRadius": 6 }, - "parcel": { "fill": "rgba( 127, 255, 255, 0.5 )", diff --git a/templates/map/client/index.html b/templates/map/client/index.html index 9d77add..b45b77d 100644 --- a/templates/map/client/index.html +++ b/templates/map/client/index.html @@ -1,59 +1,34 @@ {% load static %} + - - + + - - - - - - - - - - + + + + + + + + + + + + + + + +
- - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - -