SysAdmin/Pootle: pootle.conf

File pootle.conf, 7.3 KB (added by Fran Boon, 5 years ago)

Change SECRET_KEY & PASSWORD

Line 
1# -*- coding: utf-8 -*-
2
3"""Sample configuration file.
4
5This file includes the settings that administrators will likely change.
6You can find the defaults in the ``*.conf`` files for more advanced settings.
7"""
8
9from pootle.i18n.gettext import ugettext_lazy as _
10
11#
12# Base
13#
14
15# Site title
16POOTLE_TITLE = _(u'Pootle Translation Server')
17
18# Local time zone for this installation. Choices can be found here:
19# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
20# although not all choices may be available on all operating systems.
21# If running in a Windows environment this must be set to the same as your
22# system time zone.
23TIME_ZONE = 'UTC'
24
25# Make this unique, and don't share it with anybody.
26SECRET_KEY = 'SECRET_KEY'
27
28# A list of strings representing the host/domain names that this Pootle server
29# can serve. This is a Django's security measure.
30ALLOWED_HOSTS = [
31 '127.0.0.1',
32 'localhost',
33 #'${your_server}',
34 'pootle.sahanafoundation.org',
35]
36
37# Set this to a canonical url for your site *without trailing slash*
38# This will be used when deriving urls to send out emails
39# If you use the `django.contrib.sites` framework set this to blank
40POOTLE_CANONICAL_URL = "https://pootle.sahanafoundation.org"
41
42#
43# Backends
44#
45
46# Database backend settings
47DATABASES = {
48 'default': {
49 # Replace 'sqlite3' with 'postgresql' or 'mysql'.
50 #'ENGINE': 'django.db.backends.sqlite3',
51 'ENGINE': 'django.db.backends.postgresql',
52 # Database name or path to database file if using sqlite3.
53 #'NAME': working_path('dbs/pootle.db'),
54 'NAME': 'pootledb',
55 # Not used with sqlite3.
56 'USER': 'pootle',
57 # Not used with sqlite3.
58 'PASSWORD': 'password',
59 # Set to empty string for localhost. Not used with sqlite3.
60 'HOST': '',
61 # Set to empty string for default. Not used with sqlite3.
62 'PORT': '',
63 # See https://docs.djangoproject.com/en/1.10/topics/db/transactions/
64 # required for Django + sqlite
65 'ATOMIC_REQUESTS': True,
66 'CONN_MAX_AGE': None,
67 #'OPTIONS' : {
68 # # MySQL:
69 # # https://docs.djangoproject.com/en/1.10/ref/databases/#setting-sql-mode
70 # 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
71 #},
72 'TEST': {
73 'NAME': 'test_pootle',
74 }
75 }
76}
77
78
79# Cache Backend settings
80
81# For more information, check
82# https://docs.djangoproject.com/en/1.10/topics/cache/#setting-up-the-cache
83# and http://niwibe.github.io/django-redis/
84#CACHES = {
85# 'default': {
86# 'BACKEND': 'django_redis.cache.RedisCache',
87# 'LOCATION': 'redis://127.0.0.1:6379/1',
88# 'TIMEOUT': 60,
89# },
90# 'redis': {
91# 'BACKEND': 'django_redis.cache.RedisCache',
92# 'LOCATION': 'redis://127.0.0.1:6379/2',
93# 'TIMEOUT': None,
94# },
95# 'lru': {
96# 'BACKEND': 'django_redis.cache.RedisCache',
97# 'LOCATION': 'redis://127.0.0.1:6379/3',
98# 'TIMEOUT': 604800, # 1 week
99# },
100# 'exports': {
101# 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
102# 'LOCATION': working_path('exports/'),
103# 'TIMEOUT': 259200, # 3 days.
104# },
105#}
106
107#
108# Local Translation Memory service
109#
110
111# Setup for connection to the ElasticSearch server for translation memory based
112# on the projects hosted on Pootle.
113# You may want to set AMAGAMA_URL to '' (empty string) if using this service.
114#
115#POOTLE_TM_SERVER = {
116# 'local': {
117# 'ENGINE': 'pootle.core.search.backends.ElasticSearchBackend',
118# 'HOST': 'localhost',
119# 'PORT': 9200,
120# # Every TM server must have its own unique index.
121# 'INDEX_NAME': 'translations',
122# # Provides a weighting factor to alter the final score for TM results
123# # from this TM server. Valid values are between ``0.0`` and ``1.0``,
124# # both included. Defaults to ``1.0`` if not provided.
125# 'WEIGHT': 1.0,
126# },
127# 'external': {
128# 'ENGINE': 'pootle.core.search.backends.ElasticSearchBackend',
129# 'HOST': 'localhost',
130# 'PORT': 9200,
131# 'INDEX_NAME': 'external-translations',
132# 'WEIGHT': 0.9,
133# },
134#}
135
136#
137# Logging
138#
139
140# The directory where Pootle writes its logs
141POOTLE_LOG_DIRECTORY = working_path('log')
142
143
144#
145# Site
146#
147
148# This Pootle server admins
149ADMINS = (
150 #('Fran Boon', 'fran@sahanafoundation.org'),
151)
152
153# Mail settings
154
155# Default email address to use for messages sent by Pootle.
156DEFAULT_FROM_EMAIL = 'pootle@sahanafoundation.org'
157
158# Address to receive messages sent by contact form.
159POOTLE_CONTACT_EMAIL = 'admin@sahanafoundation.org'
160POOTLE_CONTACT_ENABLED = True
161
162# Email address to report string errors to, unless a report email was set for
163# the project for which the string error is being reported.
164# Use this as a way to forward string error reports to an address
165# different from the general contact address.
166#POOTLE_CONTACT_REPORT_EMAIL = 'string_errors_manager@YOUR_DOMAIN.com'
167
168# Whether to email reviewer's feedback to suggesters.
169POOTLE_EMAIL_FEEDBACK_ENABLED = False
170
171# Mail server settings
172
173# By default Pootle uses the SMTP server on localhost. If the server is not
174# configured for sending emails, uncomment and use these settings to setup an
175# external outgoing SMTP server.
176
177# Example for Google as an external SMTP server
178#EMAIL_HOST_USER = 'USER@YOUR_DOMAIN.com'
179#EMAIL_HOST_PASSWORD = 'YOUR_PASSWORD'
180#EMAIL_HOST = 'smtp.gmail.com'
181#EMAIL_PORT = 587
182#EMAIL_USE_TLS = True
183
184
185#
186# Translation
187#
188
189# The directory where the translation files are kept
190POOTLE_TRANSLATION_DIRECTORY = working_path('translations')
191
192# Two-tuple defining the markup filter to apply in certain textareas.
193#
194# - Accepted values for the first element are 'markdown' and
195# 'html' (deprecated).
196# - The second element should be a dictionary of keyword arguments that will be
197# passed to the markup function.
198#
199POOTLE_MARKUP_FILTER = ('markdown', {})
200
201# Set the backends you want to use to enable translation suggestions through
202# several online services. To disable this feature completely just comment all
203# the lines to set an empty list [] to the POOTLE_MT_BACKENDS setting.
204#
205# The second parameter for each backend option is the API key, which will
206# be used in case the service supports using an API key.
207#
208# Available options are:
209# 'CAIGHDEAN_TRANSLATE': Caighdeán Translate service.
210# Provides translation from Manx Gaelic (gv) and
211# Scottish Gaelic (gd), into Irish Gaelic (ga-IE)
212# See more at https://github.com/kscanne/caighdean
213# 'GOOGLE_TRANSLATE': Google Translate service.
214# For this service you need to set the API key.
215# Note that Google Translate API is a paid service
216# See more at https://cloud.google.com/translate/v2/pricing
217# 'WELSH_TRANSLATE': Welsh Translate service.
218# Provides translation from English (en) to Welsh (cy)
219# For this service you need an API key.
220# See more at http://techiaith.cymru/api/translation/?lang=en
221# 'YANDEX_TRANSLATE': Yandex Translate service.
222# For this service you need to set the API key.
223# See more at https://tech.yandex.com/translate/
224#
225POOTLE_MT_BACKENDS = [
226# ('CAIGHDEAN_TRANSLATE', ''),
227# ('GOOGLE_TRANSLATE', ''),
228# ('WELSH_TRANSLATE', ''),
229# ('YANDEX_TRANSLATE', ''),
230]
231
232
233# Custom templates directories
234#
235TEMPLATES[0]['DIRS'] = [
236 # working_path(os.path.join('custom', 'templates')),
237]