1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/weblate_ynh.git synced 2024-10-01 13:35:04 +02:00

Update settings

This commit is contained in:
Kay0u 2023-01-09 11:28:38 +01:00
parent d1d0cda4c7
commit b491760886

View file

@ -92,10 +92,9 @@ DATABASES = {
} }
} }
BASE_DIR = "__FINALPATH__" # Data directory, you can use following for the development purposes:
# os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "data")
# Data directory DATA_DIR = os.path.join("__FINALPATH__", "data")
DATA_DIR = os.path.join(BASE_DIR, "data")
# Local time zone for this installation. Choices can be found here: # Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
@ -205,7 +204,7 @@ STATICFILES_FINDERS = (
) )
# Make this unique, and don't share it with anybody. # Make this unique, and don't share it with anybody.
# You can generate it using weblate/examples/generate-secret-key # You can generate it using weblate-generate-secret-key
SECRET_KEY = "__KEY__" SECRET_KEY = "__KEY__"
TEMPLATES = [ TEMPLATES = [
@ -229,13 +228,21 @@ TEMPLATES = [
# GitHub username and token for sending pull requests. # GitHub username and token for sending pull requests.
# Please see the documentation for more details. # Please see the documentation for more details.
GITHUB_USERNAME = __GITHUB_USERNAME__ GITHUB_CREDENTIALS = {
GITHUB_TOKEN = __GITHUB_TOKEN__ "api.github.com": {
"username": "__GITHUB_USERNAME__",
"token": "__GITHUB_TOKEN__",
}
}
# GitLab username and token for sending merge requests. # GitLab username and token for sending merge requests.
# Please see the documentation for more details. # Please see the documentation for more details.
GITLAB_USERNAME = __GITLAB_USERNAME__ GITLAB_CREDENTIALS = {
GITLAB_TOKEN = __GITLAB_TOKEN__ "gitlab.com": {
"username": "__GITLAB_USERNAME__",
"token": "__GITLAB_TOKEN__",
}
}
# Authentication configuration # Authentication configuration
AUTHENTICATION_BACKENDS = ( AUTHENTICATION_BACKENDS = (
@ -638,6 +645,7 @@ SESSION_COOKIE_SECURE = ENABLE_HTTPS
SESSION_COOKIE_HTTPONLY = True SESSION_COOKIE_HTTPONLY = True
# SSL redirect # SSL redirect
SECURE_SSL_REDIRECT = ENABLE_HTTPS SECURE_SSL_REDIRECT = ENABLE_HTTPS
SECURE_SSL_HOST = SITE_DOMAIN
# Sent referrrer only for same origin links # Sent referrrer only for same origin links
SECURE_REFERRER_POLICY = "same-origin" SECURE_REFERRER_POLICY = "same-origin"
# SSL redirect URL exemption list # SSL redirect URL exemption list
@ -648,6 +656,8 @@ SESSION_COOKIE_AGE_AUTHENTICATED = 1209600
SESSION_COOKIE_SAMESITE = "Lax" SESSION_COOKIE_SAMESITE = "Lax"
# Increase allowed upload size # Increase allowed upload size
DATA_UPLOAD_MAX_MEMORY_SIZE = 50000000 DATA_UPLOAD_MAX_MEMORY_SIZE = 50000000
# Allow more fields for case with a lot of subscriptions in profile
DATA_UPLOAD_MAX_NUMBER_FIELDS = 2000
# Apply session coookie settings to language cookie as ewll # Apply session coookie settings to language cookie as ewll
LANGUAGE_COOKIE_SECURE = SESSION_COOKIE_SECURE LANGUAGE_COOKIE_SECURE = SESSION_COOKIE_SECURE
@ -800,6 +810,7 @@ CRISPY_TEMPLATE_PACK = "bootstrap3"
# "weblate.addons.generate.PseudolocaleAddon", # "weblate.addons.generate.PseudolocaleAddon",
# "weblate.addons.generate.PrefillAddon", # "weblate.addons.generate.PrefillAddon",
# "weblate.addons.json.JSONCustomizeAddon", # "weblate.addons.json.JSONCustomizeAddon",
# "weblate.addons.xml.XMLCustomizeAddon",
# "weblate.addons.properties.PropertiesSortAddon", # "weblate.addons.properties.PropertiesSortAddon",
# "weblate.addons.git.GitSquashAddon", # "weblate.addons.git.GitSquashAddon",
# "weblate.addons.removal.RemoveComments", # "weblate.addons.removal.RemoveComments",
@ -835,6 +846,7 @@ CACHES = {
"CONNECTION_POOL_KWARGS": {}, "CONNECTION_POOL_KWARGS": {},
}, },
"KEY_PREFIX": "weblate", "KEY_PREFIX": "weblate",
"TIMEOUT": 3600,
}, },
"avatar": { "avatar": {
"BACKEND": "django.core.cache.backends.filebased.FileBasedCache", "BACKEND": "django.core.cache.backends.filebased.FileBasedCache",