Make announcement email address configurable

To be more flexible in the future make the announcements email
configurable.
This commit is contained in:
Jelle van der Waa 2020-12-31 17:37:49 +01:00
parent c479a0ae74
commit 54bf3c033b
No known key found for this signature in database
GPG Key ID: C06086337C50773E
2 changed files with 5 additions and 2 deletions

View File

@ -50,8 +50,8 @@ def form_valid(self, form):
EmailMessage(
subject=f'[arch-announce] {newsitem.title}',
body=template.render(ctx),
from_email=f'"Arch Linux: Recent news updates: {newsitem.author.get_full_name()}" <arch-announce@archlinux.org>',
to=['arch-announce@archlinux.org'],
from_email=f'"Arch Linux: Recent news updates: {newsitem.author.get_full_name()}" <{settings.ANNOUNCE_EMAIL}>',
to=[settings.ANNOUNCE_EMAIL],
headers=headers).send()
return super(NewsCreateView, self).form_valid(form)

View File

@ -183,6 +183,9 @@
# Mailman poster password for announcements
MAILMAN_PASSWORD = ''
# Announcements email address
ANNOUNCE_EMAIL = 'arch-announce@archlinux.org'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',