Make announcement email address configurable
To be more flexible in the future make the announcements email configurable.
This commit is contained in:
parent
c479a0ae74
commit
54bf3c033b
@ -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)
|
||||
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user