/
50-old_local.conf
209 lines (174 loc) · 7.44 KB
/
50-old_local.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# This file contains the configuration settings for the Pootle server.
#
# It is in Python syntax. Everything after '#' is ignored as comments.
# Mail settings
# Address used for messages sent by Pootle.
#DEFAULT_FROM_EMAIL = 'info@YOUR_DOMAIN.com'
# Address to receive messages sent by contact form.
#CONTACT_EMAIL = 'info@YOUR_DOMAIN.com'
# Mail server settings
# By default Pootle uses SMTP server on localhost, if the server is
# not configured for sending emails use these settings to setup an
# external outgoing SMTP server.
# Example for Google as an external SMTP server
#EMAIL_HOST_USER = 'USER@YOUR_DOMAIN.com'
#EMAIL_HOST_PASSWORD = 'YOUR_PASSWORD'
#EMAIL_HOST = 'smtp.gmail.com'
#EMAIL_PORT = 587
#EMAIL_USE_TLS = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
# Replace 'sqlite3' with 'postgresql_psycopg2', 'mysql' or 'oracle'.
'NAME': working_path('dbs/pootle.db'),
# Database name or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
# The directory where the translation files are kept
PODIRECTORY = working_path('po')
# Live translation means that the project called "Pootle" is used to provide
# the localised versions of Pootle. Set this to True to enable live translation
# of pootle UI. This is a good way to learn how to use Pootle, but it has high
# impact on performance.
LIVE_TRANSLATION = False
# File parse pool settings
#
# To avoid rereading and reparsing translation files from disk on
# every request, Pootle keeps a pool of already parsed files in memory.
#
# Larger pools will offer better performance, but higher memory usage
# (per server process). When the pool fills up, 1/PARSE_POOL_CULL_FREQUENCY
# number of files will be removed from the pool.
# DEFAULT: 40
PARSE_POOL_SIZE = 40
# DEFAULT: 4
PARSE_POOL_CULL_FREQUENCY = 4
# Cache Backend settings
#
# By default we use Django's database cache which is only suitable
# for small deployments. memcached is preferred. For more info, check
# http://docs.djangoproject.com/en/dev/topics/cache/#setting-up-the-cache
CACHE_BACKEND = 'db://pootlecache?max_entries=65536&cull_frequency=16'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
'LOCATION': 'pootlecache',
'TIMEOUT': 60,
'OPTIONS': {
'MAX_ENTRIES': 65536,
'CULL_FREQUENCY': 16,
}
}
}
# Uncomment to use memcached for caching
#CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
#CACHES = {
# 'default': {
# 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
# 'LOCATION': '127.0.0.1:11211',
# 'KEY_PREFIX': '',
# }
#}
# Using memcached to store sessions improves performance for anonymous
# users. For more info, check
# http://docs.djangoproject.com/en/dev/topics/http/sessions/#configuring-the-session-engine
# Uncomment this if you're using memcached as CACHE_BACKEND
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
# To improve performance, non-logged users get cached copies of most pages.
# This variable is the number of seconds for which a page will be reused from
# cache. If you have a small server where more real-time statistics is
# important, you can make this lower.
# DEFAULT: 600
CACHE_MIDDLEWARE_SECONDS = 600
# Set this to False. DEBUG mode is only needed when testing betas or
# hacking Pootle.
DEBUG = False
# Whether to debug assets or not. Set to False in production environments
# for better performance, but make sure 'cssmin' is installed.
# Valid options are True, False, and "merge".
# You can set more configuration options for webassets if needed.
# Read its documentation for further details:
# http://elsdoerfer.name/docs/webassets/django/settings.html
ASSETS_DEBUG = DEBUG
# Two-tuple defining the markup filter to apply in certain textareas.
# - Accepted values for the first element are 'textile', 'markdown',
# 'restructuredtext' and None
# - The second element should be a dictionary of keyword arguments that
# will be passed to the markup function
#
# Examples:
# MARKUP_FILTER = (None, {})
# MARKUP_FILTER = ('markdown', {'safe_mode': True})
# MARKUP_FILTER = ('restructuredtext', {})
MARKUP_FILTER = (None, {})
# Use the commented definition to authenticate first with an LDAP system and
# then to fall back to Django's authentication system.
#AUTHENTICATION_BACKENDS = ('pootle.auth.ldap_backend.LdapBackend', 'django.contrib.auth.backends.ModelBackend',)
AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',)
# LDAP Setup
# The LDAP server. Format: protocol://hostname:port
AUTH_LDAP_SERVER = ''
# Anonymous Credentials
AUTH_LDAP_ANON_DN = ''
AUTH_LDAP_ANON_PASS = ''
# Base DN to search
AUTH_LDAP_BASE_DN = ''
# What are we filtering on? %s will be the username, for example 'sn=%s', or 'uid=%s'.
AUTH_LDAP_FILTER = ''
# This is a mapping of Pootle field names to LDAP fields. The key is Pootle's name, the value should be your LDAP field name. If you don't use the field
# or don't want to automatically retrieve these fields from LDAP comment them out. The only required field is 'dn'.
AUTH_LDAP_FIELDS = {
'dn': 'dn',
#'first_name':'',
#'last_name':'',
#'email':''
}
# Set this to False to disable user registration, admins will still be
# able to create user accounts.
CAN_REGISTER = True
# Set this to True to enable spam prevention through captcha, only
# useful for public Pootle instances.
USE_CAPTCHA = True
# Set this to True if you want translation files to be updated
# immediatly.
# Note that this negatively affects performance and
# should be avoided unless another application needs direct access to
# the files.
AUTOSYNC = False
# Set the backends you want to use to enable translation suggestions through
# several online services. To disable this feature completely just comment all
# the lines to set an empty list [] to the MT_BACKENDS setting.
#
# The second parameter for each backend option is the API key, which will
# be used in case the service supports using an API key.
#
# Available options are:
# 'APERTIUM': Apertium service.
# For this service you need to set the API key.
# Get your key at http://api.apertium.org/register.jsp
# 'GOOGLE_TRANSLATE': Google Translate service.
# For this service you need to set the API key.
# Note that Google Translate API is a paid service
# See more at http://code.google.com/apis/language/translate/v2/pricing.html
#
MT_BACKENDS = [
# ('APERTIUM', ''),
# ('GOOGLE_TRANSLATE', ''),
]
# Set the backends you want to use to allow web-based lookup. To disable this
# feature completely just comment all the lines to set an empty list [] to the
# LOOKUP_BACKENDS setting.
LOOKUP_BACKENDS = [
# 'wikipedia',
]
# URL used for the amaGama TM server.
# The global amaGama service should work fine, but if your language/project
# has a better server, or you want to use your own, you can define here
# its URL.
# This URL must point to the public API URL which returns JSON. Don't forget
# the trailing slash.
AMAGAMA_URL = 'http://amagama.locamotion.org/tmserver/'