Don't hardcode the email address of hackers
authorMagnus Hagander <magnus@hagander.net>
Wed, 23 Apr 2014 15:38:03 +0000 (17:38 +0200)
committerMagnus Hagander <magnus@hagander.net>
Wed, 23 Apr 2014 15:38:03 +0000 (17:38 +0200)
pgcommitfest/commitfest/views.py
pgcommitfest/settings.py

index ff8ff0d0c8d0927e93a539d5c5cca9d271cfc524..6a72b93adc2d359d6e62395df0468950ff47a976 100644 (file)
@@ -257,7 +257,8 @@ def comment(request, cfid, patchid, what):
                                msg['Subject'] = form.thread.subject
                        else:
                                msg['Subject'] = 'Re: %s' % form.thread.subject
-                       msg['To'] = 'magnus@hagander.net'
+
+                       msg['To'] = settings.HACKERS_EMAIL
                        msg['From'] = "%s %s <%s>" % (request.user.first_name, request.user.last_name, request.user.email)
                        msg['Date'] = formatdate(localtime=True)
                        msg['User-Agent'] = 'pgcommitfest'
@@ -268,7 +269,7 @@ def comment(request, cfid, patchid, what):
                        msg['References'] = '<%s> <%s>' % (form.thread.messageid, form.respid)
                        msg['Message-ID'] = make_msgid('pgcf')
 
-                       send_mail(request.user.email, 'magnus@hagander.net', msg)
+                       send_mail(request.user.email, settings.HACKERS_EMAIL, msg)
 
                        PatchHistory(patch=patch, by=request.user, what='Posted %s with messageid %s' % (what, msg['Message-ID'])).save()
 
index 850961b6ea6d597cff2712fba7366b1d8bd75fd2..3f7a043240e1642e00444011b6429d2317e4d6d7 100644 (file)
@@ -158,5 +158,8 @@ ARCHIVES_SERVER="localhost"
 ARCHIVES_PORT="8001"
 ARCHIVES_HOST="archives.postgresql.org"    # Host: header to send
 
+# Email address to pgsql-hackers. Set to something local to test maybe?
+HACKERS_EMAIL="pgsql-hackers-testing@localhost"
+
 # Load local settings overrides
 from local_settings import *