c2cgeoportal-geoportal 2.9rc27__py3-none-any.whl → 2.9rc29__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- c2cgeoportal_geoportal/lib/cacheversion.py +4 -2
- c2cgeoportal_geoportal/scaffolds/update/{{cookiecutter.project}}/geoportal/CONST_config-schema.yaml +5 -0
- c2cgeoportal_geoportal/scripts/pcreate.py +8 -26
- c2cgeoportal_geoportal/views/dev.py +2 -2
- c2cgeoportal_geoportal/views/dynamic.py +1 -1
- c2cgeoportal_geoportal/views/entry.py +1 -1
- c2cgeoportal_geoportal/views/geometry_processing.py +1 -1
- c2cgeoportal_geoportal/views/i18n.py +2 -2
- c2cgeoportal_geoportal/views/layers.py +8 -8
- c2cgeoportal_geoportal/views/login.py +23 -18
- c2cgeoportal_geoportal/views/mapserverproxy.py +4 -4
- c2cgeoportal_geoportal/views/memory.py +1 -1
- c2cgeoportal_geoportal/views/pdfreport.py +1 -1
- c2cgeoportal_geoportal/views/printproxy.py +5 -5
- c2cgeoportal_geoportal/views/profile.py +1 -1
- c2cgeoportal_geoportal/views/raster.py +1 -1
- c2cgeoportal_geoportal/views/resourceproxy.py +1 -1
- c2cgeoportal_geoportal/views/shortener.py +2 -2
- c2cgeoportal_geoportal/views/theme.py +1 -1
- c2cgeoportal_geoportal/views/tinyowsproxy.py +1 -1
- c2cgeoportal_geoportal/views/vector_tiles.py +1 -1
- {c2cgeoportal_geoportal-2.9rc27.dist-info → c2cgeoportal_geoportal-2.9rc29.dist-info}/METADATA +1 -1
- {c2cgeoportal_geoportal-2.9rc27.dist-info → c2cgeoportal_geoportal-2.9rc29.dist-info}/RECORD +26 -26
- {c2cgeoportal_geoportal-2.9rc27.dist-info → c2cgeoportal_geoportal-2.9rc29.dist-info}/WHEEL +0 -0
- {c2cgeoportal_geoportal-2.9rc27.dist-info → c2cgeoportal_geoportal-2.9rc29.dist-info}/entry_points.txt +0 -0
- {c2cgeoportal_geoportal-2.9rc27.dist-info → c2cgeoportal_geoportal-2.9rc29.dist-info}/top_level.txt +0 -0
@@ -66,9 +66,11 @@ class CachebusterTween:
|
|
66
66
|
self.cache_path = registry.settings["cache_path"]
|
67
67
|
|
68
68
|
def __call__(self, request: pyramid.request.Request) -> pyramid.response.Response:
|
69
|
-
path = request.path_info.split("/")
|
69
|
+
path = request.path_info.split("/", 3)
|
70
70
|
if len(path) > 1 and path[1] in self.cache_path:
|
71
|
-
|
71
|
+
if len(path) == 2:
|
72
|
+
raise pyramid.httpexceptions.HTTPNotFound()
|
73
|
+
# Remove the cache buster
|
72
74
|
path.pop(2)
|
73
75
|
request.path_info = "/".join(path)
|
74
76
|
|
@@ -26,7 +26,6 @@
|
|
26
26
|
# either expressed or implied, of the FreeBSD Project.
|
27
27
|
|
28
28
|
|
29
|
-
import json
|
30
29
|
import os
|
31
30
|
import re
|
32
31
|
import subprocess
|
@@ -35,7 +34,7 @@ from argparse import ArgumentParser
|
|
35
34
|
from typing import Any, Union, cast
|
36
35
|
|
37
36
|
import pkg_resources
|
38
|
-
import
|
37
|
+
import pyproj
|
39
38
|
import yaml
|
40
39
|
from cookiecutter.log import configure_logger
|
41
40
|
from cookiecutter.main import cookiecutter
|
@@ -277,31 +276,14 @@ class PCreateCommand:
|
|
277
276
|
@staticmethod
|
278
277
|
def epsg2bbox(srid: int) -> list[str] | None:
|
279
278
|
try:
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
timeout=60,
|
287
|
-
)
|
288
|
-
r1 = r.json()[0]
|
289
|
-
r = requests.get(
|
290
|
-
"https://epsg.io/trans?s_srs=4326&t_srs={srid}&data={bbox[3]},{bbox[2]}".format(
|
291
|
-
srid=srid, bbox=bbox
|
292
|
-
),
|
293
|
-
timeout=60,
|
294
|
-
)
|
295
|
-
r2 = r.json()[0]
|
296
|
-
return [r1["x"], r2["y"], r2["x"], r1["y"]]
|
297
|
-
except requests.RequestException:
|
298
|
-
print("Failed to establish a connection to epsg.io.")
|
299
|
-
except json.JSONDecodeError:
|
300
|
-
print("epsg.io doesn't return a correct json.")
|
301
|
-
except IndexError:
|
302
|
-
print("Unable to get the bbox")
|
279
|
+
crs = pyproj.CRS.from_epsg(srid)
|
280
|
+
assert crs.area_of_use is not None
|
281
|
+
transformer = pyproj.Transformer.from_crs(4326, crs)
|
282
|
+
c1 = transformer.transform(crs.area_of_use.bounds[1], crs.area_of_use.bounds[0])
|
283
|
+
c2 = transformer.transform(crs.area_of_use.bounds[3], crs.area_of_use.bounds[2])
|
284
|
+
return [c1[0], c1[1], c2[0], c2[1]]
|
303
285
|
except Exception as exception: # pylint: disable=broad-exception-caught
|
304
|
-
print(f"
|
286
|
+
print(f"Unexpected error: {str(exception)}")
|
305
287
|
return None
|
306
288
|
|
307
289
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2011-
|
1
|
+
# Copyright (c) 2011-2024, Camptocamp SA
|
2
2
|
# All rights reserved.
|
3
3
|
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -49,7 +49,7 @@ class Dev(Proxy):
|
|
49
49
|
super().__init__(request)
|
50
50
|
self.dev_url = self.request.registry.settings["devserver_url"]
|
51
51
|
|
52
|
-
@view_config(route_name="dev") # type: ignore
|
52
|
+
@view_config(route_name="dev") # type: ignore[misc]
|
53
53
|
def dev(self) -> pyramid.response.Response:
|
54
54
|
path = self.THEME_RE.sub("", self.request.path_info)
|
55
55
|
if self.request.path.endswith("/dynamic.js"):
|
@@ -122,7 +122,7 @@ class DynamicView:
|
|
122
122
|
|
123
123
|
return constants
|
124
124
|
|
125
|
-
@view_config(route_name="dynamic", renderer="json") # type: ignore
|
125
|
+
@view_config(route_name="dynamic", renderer="json") # type: ignore[misc]
|
126
126
|
def dynamic(self) -> dict[str, Any]:
|
127
127
|
is_allowed_host(self.request)
|
128
128
|
|
@@ -77,7 +77,7 @@ class Entry:
|
|
77
77
|
|
78
78
|
return "\n".join(api)
|
79
79
|
|
80
|
-
@view_config(route_name="apijs") # type: ignore
|
80
|
+
@view_config(route_name="apijs") # type: ignore[misc]
|
81
81
|
def apijs(self) -> pyramid.response.Response:
|
82
82
|
self.request.response.text = self.get_apijs(
|
83
83
|
self.request.registry.settings["static_files"]["api.js"],
|
@@ -48,7 +48,7 @@ class GeometryProcessing:
|
|
48
48
|
def __init__(self, request: pyramid.request.Request):
|
49
49
|
self.request = request
|
50
50
|
|
51
|
-
@view_config(route_name="difference", renderer="geojson") # type: ignore
|
51
|
+
@view_config(route_name="difference", renderer="geojson") # type: ignore[misc]
|
52
52
|
def difference(self) -> BaseGeometry | None:
|
53
53
|
assert DBSession is not None
|
54
54
|
|
@@ -52,7 +52,7 @@ _LOG = logging.getLogger(__name__)
|
|
52
52
|
_INITIALIZED = False
|
53
53
|
|
54
54
|
|
55
|
-
@view_config(route_name="localejson") # type: ignore
|
55
|
+
@view_config(route_name="localejson") # type: ignore[misc]
|
56
56
|
def locale(request: pyramid.request.Request) -> pyramid.response.Response:
|
57
57
|
"""Get the locale json file for the API."""
|
58
58
|
response = HTTPFound(
|
@@ -65,7 +65,7 @@ def locale(request: pyramid.request.Request) -> pyramid.response.Response:
|
|
65
65
|
return response
|
66
66
|
|
67
67
|
|
68
|
-
@view_config(route_name="localepot") # type: ignore
|
68
|
+
@view_config(route_name="localepot") # type: ignore[misc]
|
69
69
|
def localepot(request: pyramid.request.Request) -> pyramid.response.Response:
|
70
70
|
"""Get the pot from an HTTP request."""
|
71
71
|
|
@@ -323,7 +323,7 @@ class Layers:
|
|
323
323
|
raise feature
|
324
324
|
return feature
|
325
325
|
|
326
|
-
@view_config(route_name="layers_read_many", renderer="geojson") # type: ignore
|
326
|
+
@view_config(route_name="layers_read_many", renderer="geojson") # type: ignore[misc]
|
327
327
|
def read_many(self) -> FeatureCollection:
|
328
328
|
set_common_headers(self.request, "layers", Cache.PRIVATE_NO)
|
329
329
|
|
@@ -335,7 +335,7 @@ class Layers:
|
|
335
335
|
|
336
336
|
return FeatureCollection(features)
|
337
337
|
|
338
|
-
@view_config(route_name="layers_read_one", renderer="geojson") # type: ignore
|
338
|
+
@view_config(route_name="layers_read_one", renderer="geojson") # type: ignore[misc]
|
339
339
|
def read_one(self) -> Feature:
|
340
340
|
from c2cgeoportal_commons.models.main import ( # pylint: disable=import-outside-toplevel
|
341
341
|
Layer,
|
@@ -376,7 +376,7 @@ class Layers:
|
|
376
376
|
|
377
377
|
return feature
|
378
378
|
|
379
|
-
@view_config(route_name="layers_count", renderer="string") # type: ignore
|
379
|
+
@view_config(route_name="layers_count", renderer="string") # type: ignore[misc]
|
380
380
|
def count(self) -> int:
|
381
381
|
set_common_headers(self.request, "layers", Cache.PRIVATE_NO)
|
382
382
|
|
@@ -386,7 +386,7 @@ class Layers:
|
|
386
386
|
raise count
|
387
387
|
return cast(int, count)
|
388
388
|
|
389
|
-
@view_config(route_name="layers_create", renderer="geojson") # type: ignore
|
389
|
+
@view_config(route_name="layers_create", renderer="geojson") # type: ignore[misc]
|
390
390
|
def create(self) -> FeatureCollection | None:
|
391
391
|
set_common_headers(self.request, "layers", Cache.PRIVATE_NO)
|
392
392
|
|
@@ -410,7 +410,7 @@ class Layers:
|
|
410
410
|
self.request.response.status_int = 400
|
411
411
|
return {"error_type": "integrity_error", "message": str(e.orig.diag.message_primary)} # type: ignore[attr-defined]
|
412
412
|
|
413
|
-
@view_config(route_name="layers_update", renderer="geojson") # type: ignore
|
413
|
+
@view_config(route_name="layers_update", renderer="geojson") # type: ignore[misc]
|
414
414
|
def update(self) -> Feature:
|
415
415
|
set_common_headers(self.request, "layers", Cache.PRIVATE_NO)
|
416
416
|
|
@@ -464,7 +464,7 @@ class Layers:
|
|
464
464
|
return should_validate.lower() != "false"
|
465
465
|
return cast(bool, cls._get_settings(request).get("geometry_validation", False))
|
466
466
|
|
467
|
-
@view_config(route_name="layers_delete") # type: ignore
|
467
|
+
@view_config(route_name="layers_delete") # type: ignore[misc]
|
468
468
|
def delete(self) -> pyramid.response.Response:
|
469
469
|
if self.request.user is None:
|
470
470
|
raise HTTPForbidden()
|
@@ -477,7 +477,7 @@ class Layers:
|
|
477
477
|
set_common_headers(self.request, "layers", Cache.PRIVATE_NO, response=response)
|
478
478
|
return response
|
479
479
|
|
480
|
-
@view_config(route_name="layers_metadata", renderer="xsd") # type: ignore
|
480
|
+
@view_config(route_name="layers_metadata", renderer="xsd") # type: ignore[misc]
|
481
481
|
def metadata(self) -> pyramid.response.Response:
|
482
482
|
set_common_headers(self.request, "layers", Cache.PRIVATE)
|
483
483
|
|
@@ -487,7 +487,7 @@ class Layers:
|
|
487
487
|
|
488
488
|
return get_layer_class(layer, with_last_update_columns=True)
|
489
489
|
|
490
|
-
@view_config(route_name="layers_enumerate_attribute_values", renderer="json") # type: ignore
|
490
|
+
@view_config(route_name="layers_enumerate_attribute_values", renderer="json") # type: ignore[misc]
|
491
491
|
def enumerate_attribute_values(self) -> dict[str, Any]:
|
492
492
|
set_common_headers(self.request, "layers", Cache.PUBLIC)
|
493
493
|
|
@@ -50,6 +50,7 @@ from pyramid.security import forget, remember
|
|
50
50
|
from pyramid.view import forbidden_view_config, view_config
|
51
51
|
from sqlalchemy.orm.exc import NoResultFound # type: ignore[attr-defined]
|
52
52
|
|
53
|
+
import c2cgeoportal_commons.lib.url
|
53
54
|
from c2cgeoportal_commons import models
|
54
55
|
from c2cgeoportal_commons.lib.email_ import send_email_config
|
55
56
|
from c2cgeoportal_commons.models import static
|
@@ -90,7 +91,7 @@ class Login:
|
|
90
91
|
if not self.request.is_valid_referer:
|
91
92
|
_LOG.info("Invalid referrer for %s: %s", self.request.path_qs, repr(self.request.referrer))
|
92
93
|
|
93
|
-
@forbidden_view_config(renderer="login.html") # type: ignore
|
94
|
+
@forbidden_view_config(renderer="login.html") # type: ignore[misc]
|
94
95
|
def loginform403(self) -> dict[str, Any] | pyramid.response.Response:
|
95
96
|
if self.authentication_settings.get("openid_connect", {}).get("enabled", False):
|
96
97
|
return HTTPFound(
|
@@ -111,7 +112,7 @@ class Login:
|
|
111
112
|
"two_fa": self.two_factor_auth,
|
112
113
|
}
|
113
114
|
|
114
|
-
@view_config(route_name="loginform", renderer="login.html") # type: ignore
|
115
|
+
@view_config(route_name="loginform", renderer="login.html") # type: ignore[misc]
|
115
116
|
def loginform(self) -> dict[str, Any]:
|
116
117
|
if self.authentication_settings.get("openid_connect", {}).get("enabled", False):
|
117
118
|
raise HTTPBadRequest("View disabled by OpenID Connect")
|
@@ -130,7 +131,7 @@ class Login:
|
|
130
131
|
return True
|
131
132
|
return False
|
132
133
|
|
133
|
-
@view_config(route_name="login") # type: ignore
|
134
|
+
@view_config(route_name="login") # type: ignore[misc]
|
134
135
|
def login(self) -> pyramid.response.Response:
|
135
136
|
assert models.DBSession is not None
|
136
137
|
if self.authentication_settings.get("openid_connect", {}).get("enabled", False):
|
@@ -289,7 +290,7 @@ class Login:
|
|
289
290
|
response=Response(body, headers=headers.items()),
|
290
291
|
)
|
291
292
|
|
292
|
-
@view_config(route_name="logout") # type: ignore
|
293
|
+
@view_config(route_name="logout") # type: ignore[misc]
|
293
294
|
def logout(self) -> pyramid.response.Response:
|
294
295
|
if self.authentication_settings.get("openid_connect", {}).get("enabled", False):
|
295
296
|
client = oidc.get_oidc_client(self.request, self.request.host)
|
@@ -336,13 +337,13 @@ class Login:
|
|
336
337
|
)
|
337
338
|
return result
|
338
339
|
|
339
|
-
@view_config(route_name="loginuser", renderer="json") # type: ignore
|
340
|
+
@view_config(route_name="loginuser", renderer="json") # type: ignore[misc]
|
340
341
|
def loginuser(self) -> dict[str, Any]:
|
341
342
|
_LOG.info("Client IP address: %s", self.request.client_addr)
|
342
343
|
set_common_headers(self.request, "login", Cache.PRIVATE_NO)
|
343
344
|
return self._user()
|
344
345
|
|
345
|
-
@view_config(route_name="change_password", renderer="json") # type: ignore
|
346
|
+
@view_config(route_name="change_password", renderer="json") # type: ignore[misc]
|
346
347
|
def change_password(self) -> pyramid.response.Response:
|
347
348
|
assert models.DBSession is not None
|
348
349
|
|
@@ -432,7 +433,7 @@ class Login:
|
|
432
433
|
|
433
434
|
return user, username, password, None
|
434
435
|
|
435
|
-
@view_config(route_name="loginresetpassword", renderer="json") # type: ignore
|
436
|
+
@view_config(route_name="loginresetpassword", renderer="json") # type: ignore[misc]
|
436
437
|
def loginresetpassword(self) -> dict[str, Any]:
|
437
438
|
if self.authentication_settings.get("openid_connect", {}).get("enabled", False):
|
438
439
|
raise HTTPBadRequest("View disabled by OpenID Connect")
|
@@ -464,7 +465,7 @@ class Login:
|
|
464
465
|
|
465
466
|
return {"success": True}
|
466
467
|
|
467
|
-
@view_config(route_name="oauth2introspect") # type: ignore
|
468
|
+
@view_config(route_name="oauth2introspect") # type: ignore[misc]
|
468
469
|
def oauth2introspect(self) -> pyramid.response.Response:
|
469
470
|
if self.authentication_settings.get("openid_connect", {}).get("enabled", False):
|
470
471
|
raise HTTPBadRequest("View disabled by OpenID Connect")
|
@@ -497,7 +498,7 @@ class Login:
|
|
497
498
|
response=Response(body, headers=headers.items()),
|
498
499
|
)
|
499
500
|
|
500
|
-
@view_config(route_name="oauth2token") # type: ignore
|
501
|
+
@view_config(route_name="oauth2token") # type: ignore[misc]
|
501
502
|
def oauth2token(self) -> pyramid.response.Response:
|
502
503
|
if self.authentication_settings.get("openid_connect", {}).get("enabled", False):
|
503
504
|
raise HTTPBadRequest("View disabled by OpenID Connect")
|
@@ -529,7 +530,7 @@ class Login:
|
|
529
530
|
response=Response(body, headers=headers.items()),
|
530
531
|
)
|
531
532
|
|
532
|
-
@view_config(route_name="oauth2revoke_token") # type: ignore
|
533
|
+
@view_config(route_name="oauth2revoke_token") # type: ignore[misc]
|
533
534
|
def oauth2revoke_token(self) -> pyramid.response.Response:
|
534
535
|
if self.authentication_settings.get("openid_connect", {}).get("enabled", False):
|
535
536
|
raise HTTPBadRequest("View disabled by OpenID Connect")
|
@@ -559,7 +560,7 @@ class Login:
|
|
559
560
|
response=Response(body, headers=headers.items()),
|
560
561
|
)
|
561
562
|
|
562
|
-
@view_config(route_name="oauth2loginform", renderer="login.html") # type: ignore
|
563
|
+
@view_config(route_name="oauth2loginform", renderer="login.html") # type: ignore[misc]
|
563
564
|
def oauth2loginform(self) -> dict[str, Any]:
|
564
565
|
if self.authentication_settings.get("openid_connect", {}).get("enabled", False):
|
565
566
|
raise HTTPBadRequest("View disabled by OpenID Connect")
|
@@ -577,13 +578,13 @@ class Login:
|
|
577
578
|
"two_fa": self.two_factor_auth,
|
578
579
|
}
|
579
580
|
|
580
|
-
@view_config(route_name="notlogin", renderer="notlogin.html") # type: ignore
|
581
|
+
@view_config(route_name="notlogin", renderer="notlogin.html") # type: ignore[misc]
|
581
582
|
def notlogin(self) -> dict[str, Any]:
|
582
583
|
set_common_headers(self.request, "login", Cache.PUBLIC)
|
583
584
|
|
584
585
|
return {"lang": self.lang}
|
585
586
|
|
586
|
-
@view_config(route_name="oidc_login") # type: ignore
|
587
|
+
@view_config(route_name="oidc_login") # type: ignore[misc]
|
587
588
|
def oidc_login(self) -> pyramid.response.Response:
|
588
589
|
client = oidc.get_oidc_client(self.request, self.request.host)
|
589
590
|
if "came_from" in self.request.params:
|
@@ -618,17 +619,21 @@ class Login:
|
|
618
619
|
)
|
619
620
|
|
620
621
|
try:
|
621
|
-
|
622
|
-
|
622
|
+
|
623
|
+
url = c2cgeoportal_commons.lib.url.Url(
|
624
|
+
client.authorization_code_flow.start_authentication(
|
623
625
|
code_challenge=code_challenge,
|
624
626
|
code_challenge_method="S256",
|
625
|
-
)
|
626
|
-
|
627
|
+
)
|
628
|
+
)
|
629
|
+
url.add_query(
|
630
|
+
self.authentication_settings.get("openid_connect", {}).get("login_extra_params", {})
|
627
631
|
)
|
632
|
+
return HTTPFound(location=url.url(), headers=self.request.response.headers)
|
628
633
|
finally:
|
629
634
|
client.authorization_code_flow.code_challenge = ""
|
630
635
|
|
631
|
-
@view_config(route_name="oidc_callback") # type: ignore
|
636
|
+
@view_config(route_name="oidc_callback") # type: ignore[misc]
|
632
637
|
def oidc_callback(self) -> pyramid.response.Response:
|
633
638
|
client = oidc.get_oidc_client(self.request, self.request.host)
|
634
639
|
assert models.DBSession is not None
|
@@ -56,8 +56,8 @@ class MapservProxy(OGCProxy):
|
|
56
56
|
OGCProxy.__init__(self, request)
|
57
57
|
self.user = self.request.user
|
58
58
|
|
59
|
-
@view_config(route_name="mapserverproxy") # type: ignore
|
60
|
-
@view_config(route_name="mapserverproxy_post") # type: ignore
|
59
|
+
@view_config(route_name="mapserverproxy") # type: ignore[misc]
|
60
|
+
@view_config(route_name="mapserverproxy_post") # type: ignore[misc]
|
61
61
|
def proxy(self) -> Response:
|
62
62
|
if self.user is None and "authentication_required" in self.request.params:
|
63
63
|
_LOG.debug("proxy() detected authentication_required")
|
@@ -166,11 +166,11 @@ class MapservProxy(OGCProxy):
|
|
166
166
|
# Add functionalities params
|
167
167
|
self.params.update(get_mapserver_substitution_params(self.request))
|
168
168
|
|
169
|
-
@view_config(route_name="mapserverproxy_ogcapi_mapserver") # type: ignore
|
169
|
+
@view_config(route_name="mapserverproxy_ogcapi_mapserver") # type: ignore[misc]
|
170
170
|
def proxy_ogcapi_mapserver(self) -> Response:
|
171
171
|
return self.proxy_ogcapi("ogcapi")
|
172
172
|
|
173
|
-
@view_config(route_name="mapserverproxy_ogcapi_qgisserver") # type: ignore
|
173
|
+
@view_config(route_name="mapserverproxy_ogcapi_qgisserver") # type: ignore[misc]
|
174
174
|
def proxy_ogcapi_qgisserver(self) -> Response:
|
175
175
|
return self.proxy_ogcapi("wfs3")
|
176
176
|
|
@@ -43,7 +43,7 @@ from c2cgeoportal_geoportal.views import raster
|
|
43
43
|
_LOG = logging.getLogger(__name__)
|
44
44
|
|
45
45
|
|
46
|
-
@view_config(route_name="memory", renderer="fast_json") # type: ignore
|
46
|
+
@view_config(route_name="memory", renderer="fast_json") # type: ignore[misc]
|
47
47
|
def memory(request: pyramid.request.Request) -> dict[str, Any]:
|
48
48
|
"""Offer an authenticated view throw c2cwsgiutils to provide some memory information."""
|
49
49
|
auth_view(request)
|
@@ -101,7 +101,7 @@ class PdfReport(OGCProxy):
|
|
101
101
|
],
|
102
102
|
}
|
103
103
|
|
104
|
-
@view_config(route_name="pdfreport", renderer="json") # type: ignore
|
104
|
+
@view_config(route_name="pdfreport", renderer="json") # type: ignore[misc]
|
105
105
|
def get_report(self) -> pyramid.response.Response:
|
106
106
|
assert models.DBSession is not None
|
107
107
|
|
@@ -53,7 +53,7 @@ class PrintProxy(Proxy):
|
|
53
53
|
def __init__(self, request: pyramid.request.Request):
|
54
54
|
Proxy.__init__(self, request)
|
55
55
|
|
56
|
-
@view_config(route_name="printproxy_capabilities") # type: ignore
|
56
|
+
@view_config(route_name="printproxy_capabilities") # type: ignore[misc]
|
57
57
|
def capabilities(self) -> pyramid.response.Response:
|
58
58
|
"""Get print capabilities."""
|
59
59
|
templates = get_functionality("print_template", self.request, is_intranet(self.request))
|
@@ -106,7 +106,7 @@ class PrintProxy(Proxy):
|
|
106
106
|
|
107
107
|
return response, content
|
108
108
|
|
109
|
-
@view_config(route_name="printproxy_report_create") # type: ignore
|
109
|
+
@view_config(route_name="printproxy_report_create") # type: ignore[misc]
|
110
110
|
def report_create(self) -> pyramid.response.Response:
|
111
111
|
"""Create PDF."""
|
112
112
|
return self._proxy_response(
|
@@ -116,7 +116,7 @@ class PrintProxy(Proxy):
|
|
116
116
|
),
|
117
117
|
)
|
118
118
|
|
119
|
-
@view_config(route_name="printproxy_status") # type: ignore
|
119
|
+
@view_config(route_name="printproxy_status") # type: ignore[misc]
|
120
120
|
def status(self) -> pyramid.response.Response:
|
121
121
|
"""PDF status."""
|
122
122
|
return self._proxy_response(
|
@@ -126,7 +126,7 @@ class PrintProxy(Proxy):
|
|
126
126
|
),
|
127
127
|
)
|
128
128
|
|
129
|
-
@view_config(route_name="printproxy_cancel") # type: ignore
|
129
|
+
@view_config(route_name="printproxy_cancel") # type: ignore[misc]
|
130
130
|
def cancel(self) -> pyramid.response.Response:
|
131
131
|
"""PDF cancel."""
|
132
132
|
return self._proxy_response(
|
@@ -134,7 +134,7 @@ class PrintProxy(Proxy):
|
|
134
134
|
Url(f"{self.request.get_organization_print_url()}/cancel/{self.request.matchdict.get('ref')}"),
|
135
135
|
)
|
136
136
|
|
137
|
-
@view_config(route_name="printproxy_report_get") # type: ignore
|
137
|
+
@view_config(route_name="printproxy_report_get") # type: ignore[misc]
|
138
138
|
def report_get(self) -> pyramid.response.Response:
|
139
139
|
"""Get the PDF."""
|
140
140
|
url = Url(f"{self.request.get_organization_print_url()}/report/{self.request.matchdict.get('ref')}")
|
@@ -89,7 +89,7 @@ class Profile(Raster):
|
|
89
89
|
|
90
90
|
return self._to_filtered(points, layers)
|
91
91
|
|
92
|
-
@view_config(route_name="profile.json", renderer="fast_json") # type: ignore
|
92
|
+
@view_config(route_name="profile.json", renderer="fast_json") # type: ignore[misc]
|
93
93
|
def json(self) -> dict[str, Any]:
|
94
94
|
"""Answer to /profile.json."""
|
95
95
|
_, points = self._compute_points()
|
@@ -84,7 +84,7 @@ class Raster:
|
|
84
84
|
)
|
85
85
|
return result
|
86
86
|
|
87
|
-
@view_config(route_name="raster", renderer="fast_json") # type: ignore
|
87
|
+
@view_config(route_name="raster", renderer="fast_json") # type: ignore[misc]
|
88
88
|
def raster(self) -> dict[str, Any]:
|
89
89
|
lon = self._get_required_finite_float_param("lon")
|
90
90
|
lat = self._get_required_finite_float_param("lat")
|
@@ -48,7 +48,7 @@ class ResourceProxy(Proxy):
|
|
48
48
|
self.request = request
|
49
49
|
self.settings = request.registry.settings.get("resourceproxy", {})
|
50
50
|
|
51
|
-
@view_config(route_name="resourceproxy") # type: ignore
|
51
|
+
@view_config(route_name="resourceproxy") # type: ignore[misc]
|
52
52
|
def proxy(self) -> pyramid.response.Response:
|
53
53
|
target = self.request.params.get("target", "")
|
54
54
|
targets = self.settings.get("targets", [])
|
@@ -55,7 +55,7 @@ class Shortener:
|
|
55
55
|
if "base_url" in self.settings:
|
56
56
|
self.short_bases.append(self.settings["base_url"])
|
57
57
|
|
58
|
-
@view_config(route_name="shortener_get") # type: ignore
|
58
|
+
@view_config(route_name="shortener_get") # type: ignore[misc]
|
59
59
|
def get(self) -> HTTPFound:
|
60
60
|
assert DBSession is not None
|
61
61
|
|
@@ -71,7 +71,7 @@ class Shortener:
|
|
71
71
|
set_common_headers(self.request, "shortener", Cache.PUBLIC_NO)
|
72
72
|
return HTTPFound(location=short_urls[0].url)
|
73
73
|
|
74
|
-
@view_config(route_name="shortener_create", renderer="json") # type: ignore
|
74
|
+
@view_config(route_name="shortener_create", renderer="json") # type: ignore[misc]
|
75
75
|
def create(self) -> dict[str, str]:
|
76
76
|
assert DBSession is not None
|
77
77
|
|
@@ -841,7 +841,7 @@ class Theme:
|
|
841
841
|
result[functionality.name] = [functionality.value]
|
842
842
|
return result
|
843
843
|
|
844
|
-
@view_config(route_name="invalidate", renderer="json") # type: ignore
|
844
|
+
@view_config(route_name="invalidate", renderer="json") # type: ignore[misc]
|
845
845
|
def invalidate_cache(self) -> dict[str, bool]:
|
846
846
|
auth_view(self.request)
|
847
847
|
models.cache_invalidate_cb()
|
@@ -70,7 +70,7 @@ class TinyOWSProxy(OGCProxy):
|
|
70
70
|
# params hold the parameters we are going to send to TinyOWS
|
71
71
|
self.lower_params = self._get_lower_params(dict(self.request.params))
|
72
72
|
|
73
|
-
@view_config(route_name="tinyowsproxy") # type: ignore
|
73
|
+
@view_config(route_name="tinyowsproxy") # type: ignore[misc]
|
74
74
|
def proxy(self) -> pyramid.response.Response:
|
75
75
|
if self.user is None:
|
76
76
|
raise HTTPUnauthorized(
|
@@ -47,7 +47,7 @@ class VectorTilesViews:
|
|
47
47
|
def __init__(self, request: Request) -> None:
|
48
48
|
self.request = request
|
49
49
|
|
50
|
-
@view_config(route_name="vector_tiles") # type: ignore
|
50
|
+
@view_config(route_name="vector_tiles") # type: ignore[misc]
|
51
51
|
def vector_tiles(self) -> Response:
|
52
52
|
assert DBSession is not None
|
53
53
|
|
{c2cgeoportal_geoportal-2.9rc27.dist-info → c2cgeoportal_geoportal-2.9rc29.dist-info}/RECORD
RENAMED
@@ -4,7 +4,7 @@ c2cgeoportal_geoportal/resources.py,sha256=n42Gns8DKw32GstDoUdNgud6xdAidaRwgAuNH
|
|
4
4
|
c2cgeoportal_geoportal/lib/__init__.py,sha256=_67fO_aXQZRnxPXcShHBcs38mdYU5ch0FNX89RwMTgA,10431
|
5
5
|
c2cgeoportal_geoportal/lib/authentication.py,sha256=Bfws50nNiboVa2qm3Hdy_-38tygnlB8sX5AW9Zfikw0,9833
|
6
6
|
c2cgeoportal_geoportal/lib/bashcolor.py,sha256=LQgOgtFUvgJ4Ed3-YW3RPjvhBMZBbXBBkUZKE4unRCI,1889
|
7
|
-
c2cgeoportal_geoportal/lib/cacheversion.py,sha256=
|
7
|
+
c2cgeoportal_geoportal/lib/cacheversion.py,sha256=jc8jIKH_yE1NReC2kvUkTkpGERHObdWjPp6kGCWAU1o,3040
|
8
8
|
c2cgeoportal_geoportal/lib/caching.py,sha256=BZzIjgEUfv7puP8XvWY6PAni7HybcLMZrGam3D3mCyA,7124
|
9
9
|
c2cgeoportal_geoportal/lib/check_collector.py,sha256=98N43jvjzCOh19Agipf8varCD9S9I9V8XYQcrSujv0k,3396
|
10
10
|
c2cgeoportal_geoportal/lib/checker.py,sha256=QLe0SUzfSwKYQFpGgFecWkJJlVjA1O2phwf-FvQQOUc,12547
|
@@ -138,40 +138,40 @@ c2cgeoportal_geoportal/scaffolds/update/cookiecutter.json,sha256=x3FFn3b67GPGCsj
|
|
138
138
|
c2cgeoportal_geoportal/scaffolds/update/{{cookiecutter.project}}/.upgrade.yaml,sha256=8tPCziX4Wh6a2EOdjpLtvyqNtKcI7Rtjo8-bLQO8_Gg,2741
|
139
139
|
c2cgeoportal_geoportal/scaffolds/update/{{cookiecutter.project}}/CONST_CHANGELOG.txt,sha256=56LcSEuxHm9GByjQWa1xl_9TkPByY-kyMKJIn9XC8b0,10445
|
140
140
|
c2cgeoportal_geoportal/scaffolds/update/{{cookiecutter.project}}/CONST_create_template/tests/test_testapp.py,sha256=FNZI6uMsZttVpWi0_TEmBgV6MjQDUmE5ar9be3FFkV8,1794
|
141
|
-
c2cgeoportal_geoportal/scaffolds/update/{{cookiecutter.project}}/geoportal/CONST_config-schema.yaml,sha256=
|
141
|
+
c2cgeoportal_geoportal/scaffolds/update/{{cookiecutter.project}}/geoportal/CONST_config-schema.yaml,sha256=yGKWjxc_U50dOpgknUwdAUHg1HK0Txn4fhEC1KeKg9c,23603
|
142
142
|
c2cgeoportal_geoportal/scaffolds/update/{{cookiecutter.project}}/geoportal/CONST_vars.yaml,sha256=3T5I7-k8d0y-OWCrq5HT8AxuFHjTHtOfSyceNfHPdtI,49111
|
143
143
|
c2cgeoportal_geoportal/scripts/__init__.py,sha256=hHwjhQaM_T2EaupeFIyjl0N67Bcl3M99UMcCdYAjQlQ,2929
|
144
144
|
c2cgeoportal_geoportal/scripts/c2cupgrade.py,sha256=7smnq2yxs1hAF1CiyE9WfgAqNKjjtrtHevY321i-wio,36826
|
145
145
|
c2cgeoportal_geoportal/scripts/create_demo_theme.py,sha256=-SL-fvAPjgiJZEKYcbhXsZm713txhtWQB18X231k6xQ,3263
|
146
146
|
c2cgeoportal_geoportal/scripts/manage_users.py,sha256=Ih3X_V_xUw59Ums4a1x6qQQtz9VtE7PaxAj-tiZIOPg,5586
|
147
|
-
c2cgeoportal_geoportal/scripts/pcreate.py,sha256=
|
147
|
+
c2cgeoportal_geoportal/scripts/pcreate.py,sha256=AcBIGBQJCvr5fch6HbseKuOCBEpuwr_3w6uokuREZJM,10984
|
148
148
|
c2cgeoportal_geoportal/scripts/theme2fts.py,sha256=Tx1jUfDUwNtwZ5TCyfpldZIbIkzZiQ3dq-kv_YQ9yFE,13737
|
149
149
|
c2cgeoportal_geoportal/scripts/urllogin.py,sha256=qGOOvx2ZN3qnENGzo8NScRqfFC06l1yc48vU6Qx3MBo,3319
|
150
150
|
c2cgeoportal_geoportal/templates/login.html,sha256=Jy8CUw2KrSviePknsvWJLDqCUXam-vPhnMUv7UcD4Pc,2475
|
151
151
|
c2cgeoportal_geoportal/templates/notlogin.html,sha256=XLCwJ8q7hqk6GIaxwhyMOaMZZZvsD_MMZaCERO8n2AY,1528
|
152
152
|
c2cgeoportal_geoportal/templates/testi18n.html,sha256=Br6Vf5zTDdaH0L07saV_8dIIT3C9xnSqh4quzTELo2s,369
|
153
153
|
c2cgeoportal_geoportal/views/__init__.py,sha256=KNfldZFuKFfNjGJsE2HyW3gUfWUY5IKSPlQbwZpLH3Y,2639
|
154
|
-
c2cgeoportal_geoportal/views/dev.py,sha256=
|
155
|
-
c2cgeoportal_geoportal/views/dynamic.py,sha256=
|
156
|
-
c2cgeoportal_geoportal/views/entry.py,sha256=
|
154
|
+
c2cgeoportal_geoportal/views/dev.py,sha256=4_xprN8ccbiEInXcpIWRGI55nU7LZI98JN7rNy4sQVg,2539
|
155
|
+
c2cgeoportal_geoportal/views/dynamic.py,sha256=3rdtuWqutFOPcF7wCm_aiIeWie7TAZK1uaTP3-O1nTY,8852
|
156
|
+
c2cgeoportal_geoportal/views/entry.py,sha256=wlDCRGNpFlECGgwLktBEQckFAz0XBWuVwS8vHSGfBLA,6931
|
157
157
|
c2cgeoportal_geoportal/views/fulltextsearch.py,sha256=uiidVzz-mQ-_eF1GL3ZCWd67-p-PNnqE7QZkBxsro4Q,8397
|
158
|
-
c2cgeoportal_geoportal/views/geometry_processing.py,sha256=
|
159
|
-
c2cgeoportal_geoportal/views/i18n.py,sha256=
|
160
|
-
c2cgeoportal_geoportal/views/layers.py,sha256=
|
161
|
-
c2cgeoportal_geoportal/views/login.py,sha256=
|
162
|
-
c2cgeoportal_geoportal/views/mapserverproxy.py,sha256=
|
163
|
-
c2cgeoportal_geoportal/views/memory.py,sha256=
|
158
|
+
c2cgeoportal_geoportal/views/geometry_processing.py,sha256=5dkJ20Lk12zqfzvmfws2YFxutSX2vxzdetQ4CmYxSi8,2958
|
159
|
+
c2cgeoportal_geoportal/views/i18n.py,sha256=EEyM5Y7DSuQffiwpFrkFclUcneRCiir4bakXY6lGZjI,5343
|
160
|
+
c2cgeoportal_geoportal/views/layers.py,sha256=I1_9N8Zui4b2t9qfX1Z4QGX7-vOPeUKKvyJWLH8g9Fo,29226
|
161
|
+
c2cgeoportal_geoportal/views/login.py,sha256=ZskF7ioI_2_r5ILB0s3fMM4rU6_iY1_uFwChIPmY7kU,29141
|
162
|
+
c2cgeoportal_geoportal/views/mapserverproxy.py,sha256=ii_389rDXNMbtk4cWD9BSp3dDBZVin0_KsbsxPvCtkk,9498
|
163
|
+
c2cgeoportal_geoportal/views/memory.py,sha256=Vhw3vf4pjdl9DuW2PNOK6PZZOUPUn09Otym88_XIy3s,3754
|
164
164
|
c2cgeoportal_geoportal/views/ogcproxy.py,sha256=2i3cuZ2cRybEH-DvAQbrLnUxd9y3B0iKnwkpaJvhwSc,5215
|
165
|
-
c2cgeoportal_geoportal/views/pdfreport.py,sha256=
|
166
|
-
c2cgeoportal_geoportal/views/printproxy.py,sha256=
|
167
|
-
c2cgeoportal_geoportal/views/profile.py,sha256=
|
165
|
+
c2cgeoportal_geoportal/views/pdfreport.py,sha256=XG3ZMGVa_NGY9BmSi0jVMMfJqvFauQAkhiaz_5_77Wo,9622
|
166
|
+
c2cgeoportal_geoportal/views/printproxy.py,sha256=0KpG-blsFFsdmumzVQ0m_ZwMvroBQst1WWochnH6TgA,5958
|
167
|
+
c2cgeoportal_geoportal/views/profile.py,sha256=tVQxJ3_eS5HcDCzQm5Loq5WEH62GtMc--bK3QVGxLmg,8431
|
168
168
|
c2cgeoportal_geoportal/views/proxy.py,sha256=BCjFtnsrIQ2U30wk08YFLyt3Cq0yX3Rtwv5y7hCNpJ0,10390
|
169
|
-
c2cgeoportal_geoportal/views/raster.py,sha256=
|
170
|
-
c2cgeoportal_geoportal/views/resourceproxy.py,sha256=
|
171
|
-
c2cgeoportal_geoportal/views/shortener.py,sha256=
|
172
|
-
c2cgeoportal_geoportal/views/theme.py,sha256=
|
173
|
-
c2cgeoportal_geoportal/views/tinyowsproxy.py,sha256=
|
174
|
-
c2cgeoportal_geoportal/views/vector_tiles.py,sha256=
|
169
|
+
c2cgeoportal_geoportal/views/raster.py,sha256=kY6rYo4SxQP9JLbsq3_kdWdbaTVkdQDdpjrG9lUtAIM,9242
|
170
|
+
c2cgeoportal_geoportal/views/resourceproxy.py,sha256=pcHwU6hAXHeh_Ef6tuHxpRzGje8nqVKUxyZwZKOPCjI,3189
|
171
|
+
c2cgeoportal_geoportal/views/shortener.py,sha256=t-05vHSbsp6aIYV6fKk-ic6Zo45TLePIlGnPAzwrzQU,6179
|
172
|
+
c2cgeoportal_geoportal/views/theme.py,sha256=kOFfCNZ7neiaxx9O1HFJ8vIU2mEcoAQUU-WxXe08TRo,55890
|
173
|
+
c2cgeoportal_geoportal/views/tinyowsproxy.py,sha256=XAo5BxNoOSmIm4YgTvxofPWfLZbqkxK4blxdMEIzwpk,7922
|
174
|
+
c2cgeoportal_geoportal/views/vector_tiles.py,sha256=2bF3j6WvOpXAJULsEfy7pfeUBeKVheMlcUOWzHVow90,3575
|
175
175
|
tests/__init__.py,sha256=KxmbgvRWDSJoEDH1cXnDIjbfBsgCzs2KdkTPuzYMq84,3826
|
176
176
|
tests/test_cachebuster.py,sha256=asI1X_qI0MGklYuKuWyqvCPVbvhQcUe4fX91Dk-hUsE,2923
|
177
177
|
tests/test_caching.py,sha256=nQQi_5IgpUNwz_BhFZMF51BaqHGUal5Ks_8TI8QQw_M,13132
|
@@ -185,8 +185,8 @@ tests/test_mapserverproxy_route_predicate.py,sha256=SzILSSzIuilzIkUYVPZiVzLwW1du
|
|
185
185
|
tests/test_raster.py,sha256=82NJ2MXgZlMqs0ytN-VgNw376iURdk4PkAg__dyh5ns,11948
|
186
186
|
tests/test_wmstparsing.py,sha256=xjA8nJuXFl3H5Bfs4sJw_8qX8E8qvAALK7Hs2-DTP2A,9054
|
187
187
|
tests/xmlstr.py,sha256=rkTKSU4FGjupBKLx75H8o-goB0KbQrxDvdpc6xVX_uQ,5985
|
188
|
-
c2cgeoportal_geoportal-2.
|
189
|
-
c2cgeoportal_geoportal-2.
|
190
|
-
c2cgeoportal_geoportal-2.
|
191
|
-
c2cgeoportal_geoportal-2.
|
192
|
-
c2cgeoportal_geoportal-2.
|
188
|
+
c2cgeoportal_geoportal-2.9rc29.dist-info/METADATA,sha256=a4eQ7IyhzUSkPtl31Tu7pi1HikW6eZw0t9-l4bwgI5Q,1886
|
189
|
+
c2cgeoportal_geoportal-2.9rc29.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
190
|
+
c2cgeoportal_geoportal-2.9rc29.dist-info/entry_points.txt,sha256=3dnX260FsLX_AubeNMdyeta_z1X4CxcD3steAlfPx2I,1414
|
191
|
+
c2cgeoportal_geoportal-2.9rc29.dist-info/top_level.txt,sha256=PJIbY7Nx51dDrJ052f5mDA7c6Tehm5aD-Gb32L_CtJA,29
|
192
|
+
c2cgeoportal_geoportal-2.9rc29.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{c2cgeoportal_geoportal-2.9rc27.dist-info → c2cgeoportal_geoportal-2.9rc29.dist-info}/top_level.txt
RENAMED
File without changes
|