Attachment 'settings_local.py'
Download 1 # SECURITY WARNING: keep the secret key used in production secret!
2 SECRET_KEY = 'elided'
3
4 MAILMAN_ARCHIVER_KEY = 'elided'
5
6 DEBUG = False
7
8 # The SITE_ID is the 0-based index of the Django site. Often, site 0 is
9 # literally 'example.com' and your site which you add via the Django admin
10 # web UI is 1 but if you have, or had in the past, multiple sites, it may
11 # be different.
12 SITE_ID = 1
13
14 ADMINS = (
15 ('Mailman Admin', 'mailman@localhost'),
16 )
17
18 # Hosts/domain names that are valid for this site; required if DEBUG is False
19 # See https://docs.djangoproject.com/en/1.9/ref/settings/#allowed-hosts
20 #ALLOWED_HOSTS = ['*']
21 ALLOWED_HOSTS = ['localhost',
22 '127.0.0.1',
23 'your.domain',
24 'your IP',
25 ]
26
27 # And for BrowserID too, see
28 # http://django-browserid.rtfd.org/page/user/settings.html#django.conf.settings.BROWSERID_AUDIENCES
29 BROWSERID_AUDIENCES = [ "http://localhost",
30 "http://localhost:8000",
31 "http://127.0.0.1:8000",
32 "http://your.domain",
33 "https://localhost",
34 "https://localhost:8000",
35 "https://127.0.0.1:8000",
36 "https://your.domain",
37 ]
38
39
40 ## Email confirmation / address activation
41 # Add a from-address for email-confirmation:
42 # EMAIL_CONFIRMATION_FROM = 'postmaster@example.org'
43 EMAIL_CONFIRMATION_FROM = 'you@your.domain'
44
45 # This is set to console in settings.py
46 EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
47
48 MAILMAN_ARCHIVER_FROM = ('127.0.0.1',
49 '::1',
50 '::ffff:127.0.0.1',
51 'your_IP',
52 )
53
54 # The following overrides settings.py by commenting out
55 # 'django_mailman3.lib.auth.fedora',
56 # 'allauth.socialaccount.providers.openid',
57 #'allauth.socialaccount.providers.twitter',
58 #'allauth.socialaccount.providers.stackexchange',
59 # and uncommenting
60 # 'allauth.socialaccount.providers.facebook',
61 # YMMV
62 INSTALLED_APPS = (
63 'hyperkitty',
64 'postorius',
65 'django_mailman3',
66 # Uncomment the next line to enable the admin:
67 'django.contrib.admin',
68 # Uncomment the next line to enable admin documentation:
69 # 'django.contrib.admindocs',
70 'django.contrib.auth',
71 'django.contrib.contenttypes',
72 'django.contrib.sessions',
73 'django.contrib.sites',
74 'django.contrib.messages',
75 'django.contrib.staticfiles',
76 'rest_framework',
77 'django_gravatar',
78 'compressor',
79 'haystack',
80 'django_extensions',
81 'django_q',
82 'allauth',
83 'allauth.account',
84 'allauth.socialaccount',
85 # 'django_mailman3.lib.auth.fedora',
86 # 'allauth.socialaccount.providers.openid',
87 'allauth.socialaccount.providers.github',
88 'allauth.socialaccount.providers.gitlab',
89 'allauth.socialaccount.providers.google',
90 'allauth.socialaccount.providers.facebook',
91 #'allauth.socialaccount.providers.twitter',
92 #'allauth.socialaccount.providers.stackexchange',
93 )
94
95 DATABASES = {
96 'default': {
97 # 'ENGINE': 'django.db.backends.mysql', # Last part is one of 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
98 'ENGINE': 'django.db.backends.postgresql_psycopg2',
99 'NAME': 'mailman', # Example, change as needed
100 # 'USER': 'mailman',
101 'USER': 'elided',
102 'PASSWORD': 'elided',
103 'HOST': '127.0.0.1', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
104 'PORT': '', # Set to empty string for default.
105 }
106 }
107
108
109 # Cache: use the local memcached server
110 CACHES = {
111 'default': {
112 'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
113 'LOCATION': '127.0.0.1:11211',
114 }
115 }
116
117
118 # If you're behind a proxy, use the X-Forwarded-Host header
119 # See https://docs.djangoproject.com/en/1.8/ref/settings/#use-x-forwarded-host
120 USE_X_FORWARDED_HOST = True
121 # And if your proxy does your SSL encoding for you, set SECURE_PROXY_SSL_HEADER
122 # see https://docs.djangoproject.com/en/1.5/ref/settings/#secure-proxy-ssl-header
123 SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
124
125 # Use SSL when logged in. You need to enable the SSLRedirect middleware for
126 # this feature to work.
127 USE_SSL = True
128
129 TIME_ZONE = 'America/Los_Angeles'
130
131 SOCIALACCOUNT_PROVIDERS = {
132 #'openid': {
133 # 'SERVERS': [
134 # dict(id='yahoo',
135 # name='Yahoo',
136 # openid_url='http://me.yahoo.com'),
137 # ],
138 #},
139 'google': {
140 'SCOPE': ['profile', 'email'],
141 'AUTH_PARAMS': {'access_type': 'online'},
142 },
143 'facebook': {
144 'METHOD': 'oauth2',
145 'SCOPE': ['email'],
146 'FIELDS': [
147 'email',
148 'name',
149 'first_name',
150 'last_name',
151 'locale',
152 'timezone',
153 ],
154 'VERSION': 'v2.12',
155 },
156 'gitlab': {
157 'SCOPE': ['read_user'],
158 },
159 }
160
161 COMPRESS_PRECOMPILERS = (
162 ('text/x-scss', 'sass -t compressed {infile} {outfile}'),
163 ('text/x-sass', 'sass -t compressed {infile} {outfile}'),
164 )
165 COMPRESS_OFFLINE = True
166 COMPRESS_ENABLED = True
167
168 # From Address for emails sent to users
169 DEFAULT_FROM_EMAIL = 'you@your.domain'
170 # From Address for emails sent to admins
171 SERVER_EMAIL = 'you@your.domain'
172 # Compatibility with Bootstrap 3
173 from django.contrib.messages import constants as messages
174 MESSAGE_TAGS = {
175 messages.ERROR: 'danger'
176 }
177
178 POSTORIUS_TEMPLATE_BASE_URL = 'https://your.domain'
179
180 # maxking: Disable the funny thing hyperkitty does with Async task
181 # where a new one isn't scheduled if one already exists in
182 # in the queue. This *should* help with emails having bad
183 # thread_order but. So threads created after today (1-Mar 2019)
184 # should ideally not have bad thread order if my theory works.
185 HYPERKITTY_DISABLE_SINGLETON_TASKS = True
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.