forked from okfde/froide
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal_settings.py.example
305 lines (239 loc) · 8.98 KB
/
local_settings.py.example
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
from .settings import Base
class Dev(Base):
DEBUG = True
TEMPLATE_DEBUG = True
TASTYPIE_FULL_DEBUG = True
############## Site Configuration #########
# # Make this unique, and don't share it with anybody.
# SECRET_KEY = 'make_me_unique!!'
# # Update site information
# SITE_NAME = 'Froide'
# SITE_EMAIL = '[email protected]'
# SITE_URL = 'http://localhost:8000'
# SITE_ID = 1
# ADMINS = (
# # ('Your Name', '[email protected]'),
# )
# MANAGERS = ADMINS
# INTERNAL_IPS = ('127.0.0.1',)
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.contrib.gis.db.backends.postgis',
# 'NAME': '',
# 'USER': '',
# 'PASSWORD': '',
# 'HOST': '',
# 'PORT': '',
# }
# }
# ELASTICSEARCH_INDEX_PREFIX = 'froide'
# ELASTICSEARCH_DSL = {
# 'default': {
# 'hosts': 'localhost:9200'
# },
# }
# # Add real cache
# CACHES = {
# 'default': {
# 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
# 'LOCATION': 'unique-snowflake'
# }
# }
############### PATHS ###############
# GEOIP_PATH = None
# @property
# def GEOIP_PATH(self):
# return os.path.join(super(Dev, self).PROJECT_ROOT, '..', 'data')
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
# MEDIA_ROOT = os.path.join(PROJECT_ROOT, "..", "files")
# Sub path in MEDIA_ROOT that will hold FOI attachments
# FOI_MEDIA_PATH = 'foi'
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
# STATIC_ROOT = os.path.join(PROJECT_ROOT, "..", "public")
# Additional locations of static files
# STATICFILES_DIRS = (
# os.path.join(PROJECT_ROOT, "static"),
# )
# Additional locations of template files
# TEMPLATE_DIRS = (
# os.path.join(PROJECT_ROOT, "templates"),
# )
########### URLs #################
# ROOT_URLCONF = 'froide.urls'
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
# MEDIA_URL = '/files/'
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
# URL that handles the static files like app media.
# Example: "http://media.lawrence.com"
# STATIC_URL = "/static/"
# # Use nginx to serve uploads authenticated
# INTERNAL_MEDIA_PREFIX = '/protected/'
### URLs that can be translated to a secret value
# SECRET_URLS = {
# "admin": "admin"
# }
########## I18N and L10N ##################
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# On Unix systems, a value of None will cause Django to use the same
# timezone as the operating system.
# If running in a Windows environment this must be set to the same as your
# system time zone.
# TIME_ZONE = 'Europe/Berlin'
# USE_TZ = True
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
# LANGUAGE_CODE = 'en-us'
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
# USE_I18N = True
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale
# USE_L10N = True
# DATE_FORMAT = "d. F Y"
# SHORT_DATE_FORMAT = "d.m.Y"
# DATE_INPUT_FORMATS = ("%d.%m.%Y",)
# SHORT_DATETIME_FORMAT = "d.m.Y H:i"
# DATETIME_INPUT_FORMATS = ("%d.%m.%Y %H:%M",)
# TIME_FORMAT = "H:i"
# TIME_INPUT_FORMATS = ("%H:%M",)
# Holidays in your country
# # Change for your own holidays
# # Format: (month, day)
# HOLIDAYS = [
# (1, 1), # New Year's Day
# (5, 1), # Labour Day
# (10, 3), # German Unity Day
# (12, 25), # Christmas
# (12, 26) # Second day of Christmas
# ]
# # Weekends are non-working days
# HOLIDAYS_WEEKENDS = True
# # Holidays are on days offset to easter sunday
# # This is a list of offsets
# HOLIDAYS_FOR_EASTER = (0, -2, 1, 39, 50, 60)
######### Logging ##########
# A sample logging configuration.
# LOGGING = {
# 'version': 1,
# 'disable_existing_loggers': True,
# 'root': {
# 'level': 'WARNING',
# 'handlers': [],
# },
# 'filters': {
# 'require_debug_false': {
# '()': 'django.utils.log.RequireDebugFalse'
# }
# },
# 'formatters': {
# 'verbose': {
# 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
# },
# },
# 'handlers': {
# 'mail_admins': {
# 'level': 'ERROR',
# 'filters': ['require_debug_false'],
# 'class': 'django.utils.log.AdminEmailHandler'
# },
# 'console': {
# 'level': 'DEBUG',
# 'class': 'logging.StreamHandler',
# }
# },
# 'loggers': {
# 'froide': {
# 'handlers': ['console'],
# 'propagate': True,
# 'level': 'DEBUG',
# },
# 'django.request': {
# 'handlers': ['mail_admins'],
# 'level': 'ERROR',
# 'propagate': True,
# },
# 'django.db.backends': {
# 'level': 'ERROR',
# 'handlers': ['console'],
# 'propagate': False,
# }
# }
# }
######### Security ###########
# # enable security features for https-deploys
# CSRF_COOKIE_SECURE = False
# CSRF_FAILURE_VIEW = 'froide.account.views.csrf_failure'
# SESSION_COOKIE_AGE = 3628800 # six weeks
# SESSION_COOKIE_HTTPONLY = True
# SESSION_COOKIE_SECURE = False
# Only in production, but don't forget
# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https')
# ALLOWED_HOSTS = ('example.com',)
# # Django-Secure options
# SECURE_FRAME_DENY = True
######### Celery #############
# # Set to false to actually use celery
# CELERY_TASK_ALWAYS_EAGER = True
########## Froide settings ########
# FROIDE_CONFIG.update(dict(
# user_can_hide_web=True,
# public_body_officials_public=True,
# public_body_officials_email_public=False,
# request_public_after_due_days=14,
# payment_possible=True,
# currency="Euro",
# default_law=1
# search_engine_query="http://www.google.de/search?as_q=%(query)s&as_epq=&as_oq=&as_eq=&hl=en&lr=&cr=&as_ft=i&as_filetype=&as_qdr=all&as_occt=any&as_dt=i&as_sitesearch=%(domain)s&as_rights=&safe=images",
# greetings=[rec(r"Dear (?:Mr\.?|Ms\.? .*?)")],
# closings=[rec(r"Sincerely yours,?")],
# public_body_boosts={},
# autocomplete_body_boosts={},
# doc_conversion_binary=None,
# doc_conversion_call_func=None
# ))
####### Email ##############
# Django settings
# # Change to real backend
# EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# EMAIL_SUBJECT_PREFIX = '[Froide] '
# SERVER_EMAIL = '[email protected]'
# DEFAULT_FROM_EMAIL = '[email protected]'
# Official Notification Mail goes through
# the normal Django SMTP Backend
# EMAIL_HOST = ""
# EMAIL_PORT = 587
# EMAIL_HOST_USER = ""
# EMAIL_HOST_PASSWORD = ""
# EMAIL_USE_TLS = True
# Froide special case settings
# IMAP settings for fetching mail
# FOI_EMAIL_PORT_IMAP = 993
# FOI_EMAIL_HOST_IMAP = "imap.example.com"
# FOI_EMAIL_ACCOUNT_NAME = "[email protected]"
# FOI_EMAIL_ACCOUNT_PASSWORD = ""
# FOI_EMAIL_USE_SSL = True
# SMTP settings for setting FoI mail
# like Django
# FOI_EMAIL_HOST_USER = FOI_EMAIL_ACCOUNT_NAME
# FOI_EMAIL_HOST_FROM = FOI_EMAIL_HOST_USER
# FOI_EMAIL_HOST_PASSWORD = FOI_EMAIL_ACCOUNT_PASSWORD
# FOI_EMAIL_HOST = "smtp.example.com"
# FOI_EMAIL_PORT = 537
# FOI_EMAIL_USE_TLS = True
# The FoI Mail can use a different account
# FOI_EMAIL_DOMAIN = "example.com"
# Custom FOI email sender address:
# FOI_EMAIL_FUNC = lambda user_name, secret: "%s.%s@%s" % (user_name, secret, FOI_EMAIL_DOMAIN)
# Is the message you can send from fixed (put custom
# address in Reply-To header)
# or can you send from any address you like?
# FOI_EMAIL_FIXED_FROM_ADDRESS = True