konova/konova/settings.py
mipel 4d651aec24 Intervention Detail View
* adds (WIP) detail view for interventions
* renames typo in conservations_file_number to conservation_file_number
* adds simple has_access check for intervention objects for given users
* renames occurences of "Registered" to "Recorded" (verzeichnen)
* adds an informing message for detail view of intervention objects which are not editable for a user
* adds GeometryAdmin
* adds fallback DEFAULT_SRID for Geometry model
* adds translations
2021-07-22 13:19:14 +02:00

66 lines
1.7 KiB
Python

"""
Django settings for konova project.
Generated by 'django-admin startproject' using Django 3.1.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from django.utils.translation import gettext_lazy as _
# Load other settings
from konova.enums import ServerMessageImportance
from konova.sub_settings.django_settings import *
# Num of days if user enables Remember-me on login
KEEP_LOGGED_DURATION = 30
# 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 = "{}sso/".format(SSO_SERVER_BASE)
SSO_PRIVATE_KEY = "QuziFeih7U8DZvQQ1riPv2MXz0ZABupHED9wjoqZAqeMQaqkqTfxJDRXgSIyASwJ"
SSO_PUBLIC_KEY = "AGGK7E8eT5X5u2GD38ygGG3GpAefmIldJiiWW7gldRPqCG1CzmUfGdvPSGDbEY2n"
# MAPS
DEFAULT_LAT = 50.00
DEFAULT_LON = 7.00
DEFAULT_ZOOM = 8.0
DEFAULT_SRID = 4326
# GROUPS
DEFAULT_GROUP = "Default"
ZB_GROUP = "Registration office"
ETS_GROUP = "Conservation office"
# ServerMessageImportance bootstrap resolver
SVI_BOOTSTRAP_CLS_MAP = {
ServerMessageImportance.DEFAULT.value: "",
ServerMessageImportance.WARNING.value: "alert-danger",
ServerMessageImportance.INFO.value: "alert-info",
}
# HELP PAGE LINK
HELP_LINK = "https://dienste.naturschutz.rlp.de/doku/doku.php?id=ksp:start"