#95 Split settings file
* splits konova/settings.py file into more separate setting files in konova/sub_settings/
This commit is contained in:
parent
de96162ee0
commit
896ad55749
@ -11,14 +11,15 @@ https://docs.djangoproject.com/en/3.1/ref/settings/
|
||||
"""
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
# Load other settings
|
||||
# Load sub settings
|
||||
# If new settings need to be added as general settings to the whole project, outsource them into new xy_settings files!
|
||||
from konova.sub_settings.django_settings import *
|
||||
from konova.sub_settings.proxy_settings import *
|
||||
from konova.sub_settings.sso_settings import *
|
||||
from konova.sub_settings.table_settings import *
|
||||
from konova.sub_settings.lanis_settings import *
|
||||
from konova.sub_settings.wfs_parcel_settings import *
|
||||
|
||||
proxy = "CHANGE_ME"
|
||||
PROXIES = {
|
||||
"http": proxy,
|
||||
"https": proxy,
|
||||
}
|
||||
|
||||
# ALLOWED FILE UPLOAD DEFINITIONS
|
||||
# Default: Upload into upper folder of code
|
||||
@ -37,57 +38,7 @@ EMA_DOC_PATH = BASE_DOC_PATH + "ema/{}/"
|
||||
# German DateTime string format
|
||||
STRF_DATE_TIME = "%d.%m.%Y %H:%M:%S"
|
||||
|
||||
# Tables
|
||||
RESULTS_PER_PAGE_PARAM = "rpp"
|
||||
PAGE_PARAM = "page"
|
||||
PAGE_SIZE_OPTIONS = [5, 10, 15, 20, 25, 50, 100]
|
||||
PAGE_SIZE_OPTIONS_TUPLES = [
|
||||
(5, 5),
|
||||
(10, 10),
|
||||
(15, 15),
|
||||
(20, 20),
|
||||
(25, 25),
|
||||
(50, 50),
|
||||
(100, 100),
|
||||
]
|
||||
PAGE_SIZE_DEFAULT = 5
|
||||
PAGE_SIZE_MAX = 100
|
||||
PAGE_DEFAULT = 1
|
||||
|
||||
# SSO settings
|
||||
SSO_SERVER_BASE = "http://127.0.0.1:8000/"
|
||||
SSO_SERVER = f"{SSO_SERVER_BASE}sso/"
|
||||
SSO_PRIVATE_KEY = "CHANGE_ME"
|
||||
SSO_PUBLIC_KEY = "CHANGE_ME"
|
||||
|
||||
# MAPS
|
||||
DEFAULT_LAT = 50.00
|
||||
DEFAULT_LON = 7.00
|
||||
DEFAULT_ZOOM = 8.0
|
||||
DEFAULT_SRID = 4326
|
||||
DEFAULT_SRID_RLP = 25832
|
||||
|
||||
# GROUPS
|
||||
DEFAULT_GROUP = "Default"
|
||||
ZB_GROUP = "Registration office"
|
||||
ETS_GROUP = "Conservation office"
|
||||
|
||||
# Needed to redirect to LANIS
|
||||
## Values to be inserted are [zoom_level, x_coord, y_coord]
|
||||
LANIS_LINK_TEMPLATE = "https://geodaten.naturschutz.rlp.de/kartendienste_naturschutz/index.php?lang=de&zl={}&x={}&y={}&bl=tk_rlp_tms_grau&bo=1&lo=0.8,0.8,0.8,0.6,0.8,0.8,0.8,0.8,0.8&layers=eiv_f,eiv_l,eiv_p,kom_f,kom_l,kom_p,oek_f,ema_f,mae&service=kartendienste_naturschutz"
|
||||
## This look up table (LUT) defines different zoom levels on the size of the calculate area of a geometry.
|
||||
LANIS_ZOOM_LUT = {
|
||||
1000000000: 6,
|
||||
100000000: 10,
|
||||
10000000: 17,
|
||||
1000000: 20,
|
||||
100000: 25,
|
||||
10000: 28,
|
||||
1000: 30,
|
||||
500: 31,
|
||||
}
|
||||
|
||||
# Parcel WFS settings
|
||||
PARCEL_WFS_BASE_URL = "https://www.geoportal.rlp.de/registry/wfs/519"
|
||||
PARCEL_WFS_USER = "ksp"
|
||||
PARCEL_WFS_PW = "CHANGE_ME"
|
29
konova/sub_settings/lanis_settings.py
Normal file
29
konova/sub_settings/lanis_settings.py
Normal file
@ -0,0 +1,29 @@
|
||||
"""
|
||||
Author: Michel Peltriaux
|
||||
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
||||
Contact: michel.peltriaux@sgdnord.rlp.de
|
||||
Created on: 31.01.22
|
||||
|
||||
"""
|
||||
|
||||
# MAPS
|
||||
DEFAULT_LAT = 50.00
|
||||
DEFAULT_LON = 7.00
|
||||
DEFAULT_ZOOM = 8.0
|
||||
DEFAULT_SRID = 4326
|
||||
DEFAULT_SRID_RLP = 25832
|
||||
|
||||
# Needed to redirect to LANIS
|
||||
## Values to be inserted are [zoom_level, x_coord, y_coord]
|
||||
LANIS_LINK_TEMPLATE = "https://geodaten.naturschutz.rlp.de/kartendienste_naturschutz/index.php?lang=de&zl={}&x={}&y={}&bl=tk_rlp_tms_grau&bo=1&lo=0.8,0.8,0.8,0.6,0.8,0.8,0.8,0.8,0.8&layers=eiv_f,eiv_l,eiv_p,kom_f,kom_l,kom_p,oek_f,ema_f,mae&service=kartendienste_naturschutz"
|
||||
## This look up table (LUT) defines different zoom levels on the size of the calculate area of a geometry.
|
||||
LANIS_ZOOM_LUT = {
|
||||
1000000000: 6,
|
||||
100000000: 10,
|
||||
10000000: 17,
|
||||
1000000: 20,
|
||||
100000: 25,
|
||||
10000: 28,
|
||||
1000: 30,
|
||||
500: 31,
|
||||
}
|
13
konova/sub_settings/proxy_settings.py
Normal file
13
konova/sub_settings/proxy_settings.py
Normal file
@ -0,0 +1,13 @@
|
||||
"""
|
||||
Author: Michel Peltriaux
|
||||
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
||||
Contact: michel.peltriaux@sgdnord.rlp.de
|
||||
Created on: 31.01.22
|
||||
|
||||
"""
|
||||
|
||||
proxy = ""
|
||||
PROXIES = {
|
||||
"http": proxy,
|
||||
"https": proxy,
|
||||
}
|
13
konova/sub_settings/sso_settings.py
Normal file
13
konova/sub_settings/sso_settings.py
Normal file
@ -0,0 +1,13 @@
|
||||
"""
|
||||
Author: Michel Peltriaux
|
||||
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
||||
Contact: michel.peltriaux@sgdnord.rlp.de
|
||||
Created on: 31.01.22
|
||||
|
||||
"""
|
||||
|
||||
# SSO settings
|
||||
SSO_SERVER_BASE = "http://127.0.0.1:8000/"
|
||||
SSO_SERVER = f"{SSO_SERVER_BASE}sso/"
|
||||
SSO_PRIVATE_KEY = "CHANGE_ME"
|
||||
SSO_PUBLIC_KEY = "CHANGE_ME"
|
24
konova/sub_settings/table_settings.py
Normal file
24
konova/sub_settings/table_settings.py
Normal file
@ -0,0 +1,24 @@
|
||||
"""
|
||||
Author: Michel Peltriaux
|
||||
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
||||
Contact: michel.peltriaux@sgdnord.rlp.de
|
||||
Created on: 31.01.22
|
||||
|
||||
"""
|
||||
|
||||
# Tables
|
||||
RESULTS_PER_PAGE_PARAM = "rpp"
|
||||
PAGE_PARAM = "page"
|
||||
PAGE_SIZE_OPTIONS = [5, 10, 15, 20, 25, 50, 100]
|
||||
PAGE_SIZE_OPTIONS_TUPLES = [
|
||||
(5, 5),
|
||||
(10, 10),
|
||||
(15, 15),
|
||||
(20, 20),
|
||||
(25, 25),
|
||||
(50, 50),
|
||||
(100, 100),
|
||||
]
|
||||
PAGE_SIZE_DEFAULT = 5
|
||||
PAGE_SIZE_MAX = 100
|
||||
PAGE_DEFAULT = 1
|
12
konova/sub_settings/wfs_parcel_settings.py
Normal file
12
konova/sub_settings/wfs_parcel_settings.py
Normal file
@ -0,0 +1,12 @@
|
||||
"""
|
||||
Author: Michel Peltriaux
|
||||
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
||||
Contact: michel.peltriaux@sgdnord.rlp.de
|
||||
Created on: 31.01.22
|
||||
|
||||
"""
|
||||
|
||||
# Parcel WFS settings
|
||||
PARCEL_WFS_BASE_URL = "https://www.geoportal.rlp.de/registry/wfs/519"
|
||||
PARCEL_WFS_USER = "ksp"
|
||||
PARCEL_WFS_PW = "CHANGE_ME"
|
Loading…
Reference in New Issue
Block a user