Rename NOREPLY_FROM to ACCOUNTS_NOREPLY_FROM
authorMagnus Hagander <magnus@hagander.net>
Tue, 1 May 2018 15:52:15 +0000 (17:52 +0200)
committerMagnus Hagander <magnus@hagander.net>
Tue, 1 May 2018 15:52:15 +0000 (17:52 +0200)
This is today only used for things coming out of the accounts system,
like new accounts and password resets. To make sure we don't
accidentally start using it for something else, change the name of the
parameter.

pgweb/account/views.py
pgweb/settings.py

index 2a592485f43ece4c7861c5ea1707d93834bb0569..db61c494223e4c520a5ce7139d13a6a08a9ae8c2 100644 (file)
@@ -157,7 +157,7 @@ def change_email(request):
                                                                         token=generate_random_token())
                        token.save()
 
-                       send_template_mail(settings.NOREPLY_FROM,
+                       send_template_mail(settings.ACCOUNTS_NOREPLY_FROM,
                                                           form.cleaned_data['email'],
                                                           'Your postgresql.org community account',
                                                           'account/email_change_email.txt',
@@ -251,7 +251,7 @@ def resetpwd(request):
                if form.is_valid():
                        log.info("Initiating password set from {0} for {1}".format(get_client_ip(request), form.cleaned_data['email']))
                        token = default_token_generator.make_token(u)
-                       send_template_mail(settings.NOREPLY_FROM,
+                       send_template_mail(settings.ACCOUNTS_NOREPLY_FROM,
                                                           form.cleaned_data['email'],
                                                           'Password reset for your postgresql.org account',
                                                           'account/password_reset_email.txt',
@@ -315,7 +315,7 @@ def signup(request):
                        log.info("Generated token {0} for user {1} from {2}".format(token, form.cleaned_data['username'], get_client_ip(request)))
 
                        # Generate an outgoing email
-                       send_template_mail(settings.NOREPLY_FROM,
+                       send_template_mail(settings.ACCOUNTS_NOREPLY_FROM,
                                                           form.cleaned_data['email'],
                                                           'Your new postgresql.org community account',
                                                           'account/new_account_email.txt',
index deffbb396cd4bf8986603a6df55a8153f63208c8..8887a9548259e5c0d641526fd95d080b946ec426 100644 (file)
@@ -143,7 +143,7 @@ YUM_JSON="/usr/local/pgweb/external/yum.json"
 STATIC_CHECKOUT="/usr/local/pgweb-static"              # Location of a checked out pgweb-static project
 NOTIFICATION_EMAIL="someone@example.com"               # Address to send notifications *to*
 NOTIFICATION_FROM="someone@example.com"                # Address to send notifications *from*
-NOREPLY_FROM="someone@example.com"                     # Address to send unverified messages from
+ACCOUNTS_NOREPLY_FROM="someone@example.com"            # Address to send account messages from
 BUGREPORT_EMAIL="someone@example.com"                  # Address to pgsql-bugs list
 BUGREPORT_NOREPLY_EMAIL="someone-noreply@example.com"  # Address to no-reply pgsql-bugs address
 DOCSREPORT_EMAIL="someone@example.com"                 # Address to pgsql-docs list