summaryrefslogtreecommitdiff
path: root/django/archives/settings.py
diff options
context:
space:
mode:
authorMagnus Hagander2019-06-18 11:41:58 +0000
committerMagnus Hagander2019-06-18 11:44:15 +0000
commit9899552d3398c0f9dca4540c23174d237c2a7517 (patch)
tree425acca82f30147ae6e86658801b5b7ae063a901 /django/archives/settings.py
parent819e05a3845ffef1f0ee1148635648f5fb972c63 (diff)
Implement email resending in the list archives
This allows a logged-in user to get an email delivered to their mailbox, thereby making it easy to reply to even if they haven't got it already (and don't have a MUA capable of handling mbox files). The email body will go out unmodified (including any list headers that are stored in the archives, but this does not include for example the unsubscribe link). Envelope sender is set to one configured in the ini file, and envelope recipient is set to the email address of the user.
Diffstat (limited to 'django/archives/settings.py')
-rw-r--r--django/archives/settings.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/django/archives/settings.py b/django/archives/settings.py
index 80b990e..5761344 100644
--- a/django/archives/settings.py
+++ b/django/archives/settings.py
@@ -100,6 +100,8 @@ TEMPLATES = [{
INSTALLED_APPS = [
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
'archives.mailarchives',
]
@@ -133,6 +135,7 @@ FORCE_SCRIPT_NAME = ""
SEARCH_CLIENTS = ('127.0.0.1',)
API_CLIENTS = ('127.0.0.1',)
PUBLIC_ARCHIVES = False
+ALLOW_RESEND = False
try:
from .settings_local import *
@@ -140,16 +143,15 @@ except ImportError:
pass
# If this is a non-public site, enable middleware for handling logins etc
-if not PUBLIC_ARCHIVES:
+if ALLOW_RESEND or not PUBLIC_ARCHIVES:
MIDDLEWARE_CLASSES = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
] + MIDDLEWARE_CLASSES
MIDDLEWARE_CLASSES.append('archives.mailarchives.redirecthandler.RedirectMiddleware')
INSTALLED_APPS = [
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
'django.contrib.sessions',
] + INSTALLED_APPS