mirror of
https://github.com/YunoHost-Apps/weblate_ynh.git
synced 2024-10-01 13:35:04 +02:00
Update settings.py to 3.3
This commit is contained in:
parent
e61cb6e29a
commit
a300466702
1 changed files with 13 additions and 2 deletions
|
@ -319,8 +319,12 @@ AUTH_PASSWORD_VALIDATORS = [
|
||||||
# },
|
# },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Allow new user registrations
|
||||||
|
REGISTRATION_OPEN = True
|
||||||
|
|
||||||
# Middleware
|
# Middleware
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
'weblate.middleware.ProxyMiddleware',
|
||||||
'django.middleware.security.SecurityMiddleware',
|
'django.middleware.security.SecurityMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
|
@ -516,6 +520,7 @@ if not HAVE_SYSLOG:
|
||||||
# 'weblate.machinery.microsoft.MicrosoftCognitiveTranslation',
|
# 'weblate.machinery.microsoft.MicrosoftCognitiveTranslation',
|
||||||
# 'weblate.machinery.microsoftterminology.MicrosoftTerminologyService',
|
# 'weblate.machinery.microsoftterminology.MicrosoftTerminologyService',
|
||||||
# 'weblate.machinery.mymemory.MyMemoryTranslation',
|
# 'weblate.machinery.mymemory.MyMemoryTranslation',
|
||||||
|
# 'weblate.machinery.netease.NeteaseSightTranslation',
|
||||||
# 'weblate.machinery.tmserver.AmagamaTranslation',
|
# 'weblate.machinery.tmserver.AmagamaTranslation',
|
||||||
# 'weblate.machinery.tmserver.TMServerTranslation',
|
# 'weblate.machinery.tmserver.TMServerTranslation',
|
||||||
# 'weblate.machinery.yandex.YandexTranslation',
|
# 'weblate.machinery.yandex.YandexTranslation',
|
||||||
|
@ -556,6 +561,10 @@ MT_BAIDU_SECRET = None
|
||||||
MT_YOUDAO_ID = None
|
MT_YOUDAO_ID = None
|
||||||
MT_YOUDAO_SECRET = None
|
MT_YOUDAO_SECRET = None
|
||||||
|
|
||||||
|
# Netease Sight (Jianwai) app key and secret
|
||||||
|
MT_NETEASE_KEY = None
|
||||||
|
MT_NETEASE_SECRET = None
|
||||||
|
|
||||||
# API key for Yandex Translate API
|
# API key for Yandex Translate API
|
||||||
MT_YANDEX_KEY = None
|
MT_YANDEX_KEY = None
|
||||||
|
|
||||||
|
@ -577,7 +586,7 @@ ENABLE_HTTPS = True
|
||||||
|
|
||||||
# Use HTTPS when creating redirect URLs for social authentication, see
|
# Use HTTPS when creating redirect URLs for social authentication, see
|
||||||
# documentation for more details:
|
# documentation for more details:
|
||||||
# http://python-social-auth-docs.readthedocs.io/en/latest/configuration/settings.html#processing-redirects-and-urlopen
|
# https://python-social-auth-docs.readthedocs.io/en/latest/configuration/settings.html#processing-redirects-and-urlopen
|
||||||
SOCIAL_AUTH_REDIRECT_IS_HTTPS = ENABLE_HTTPS
|
SOCIAL_AUTH_REDIRECT_IS_HTTPS = ENABLE_HTTPS
|
||||||
|
|
||||||
# Make CSRF cookie HttpOnly, see documentation for more details:
|
# Make CSRF cookie HttpOnly, see documentation for more details:
|
||||||
|
@ -615,8 +624,8 @@ LOGIN_REDIRECT_URL = '{0}/'.format(URL_PREFIX)
|
||||||
ANONYMOUS_USER_NAME = 'anonymous'
|
ANONYMOUS_USER_NAME = 'anonymous'
|
||||||
|
|
||||||
# Reverse proxy settings
|
# Reverse proxy settings
|
||||||
IP_BEHIND_REVERSE_PROXY = False
|
|
||||||
IP_PROXY_HEADER = 'HTTP_X_FORWARDED_FOR'
|
IP_PROXY_HEADER = 'HTTP_X_FORWARDED_FOR'
|
||||||
|
IP_BEHIND_REVERSE_PROXY = False
|
||||||
IP_PROXY_OFFSET = 0
|
IP_PROXY_OFFSET = 0
|
||||||
|
|
||||||
# Sending HTML in mails
|
# Sending HTML in mails
|
||||||
|
@ -812,9 +821,11 @@ REST_FRAMEWORK = {
|
||||||
# Celery worker configuration for testing
|
# Celery worker configuration for testing
|
||||||
# CELERY_TASK_ALWAYS_EAGER = True
|
# CELERY_TASK_ALWAYS_EAGER = True
|
||||||
# CELERY_BROKER_URL = 'memory://'
|
# CELERY_BROKER_URL = 'memory://'
|
||||||
|
# CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
|
||||||
# Celery worker configuration for production
|
# Celery worker configuration for production
|
||||||
CELERY_TASK_ALWAYS_EAGER = False
|
CELERY_TASK_ALWAYS_EAGER = False
|
||||||
CELERY_BROKER_URL = 'redis://127.0.0.1:6379/__REDIS_DB__'
|
CELERY_BROKER_URL = 'redis://127.0.0.1:6379/__REDIS_DB__'
|
||||||
|
CELERY_RESULT_BACKEND = CELERY_BROKER_URL
|
||||||
|
|
||||||
# Celery settings, it is not recommended to change these
|
# Celery settings, it is not recommended to change these
|
||||||
CELERY_WORKER_PREFETCH_MULTIPLIER = 0
|
CELERY_WORKER_PREFETCH_MULTIPLIER = 0
|
||||||
|
|
Loading…
Reference in a new issue