From 7ac716ffa9e06cafa9bb711622a261ad8ebf3ebf Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Tue, 16 Aug 2011 21:28:04 +0200 Subject: [PATCH] Get wwwmaster from settings instead of hardcoded, when possible --- pgweb/account/views.py | 2 +- templates/account/new_account_email.txt | 2 +- templates/core/moderation_report.txt | 2 +- tools/moderation/moderation_report.py | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pgweb/account/views.py b/pgweb/account/views.py index ed01e688..75281b81 100644 --- a/pgweb/account/views.py +++ b/pgweb/account/views.py @@ -106,7 +106,7 @@ def signup(request): form.cleaned_data['email'], 'Your new postgresql.org community account', 'account/new_account_email.txt', - { 'uid': int_to_base36(user.id), 'token': token, 'user': user} + { 'uid': int_to_base36(user.id), 'token': token, 'user': user, 'mastersite': settings.MASTERSITE_ROOT} ) return HttpResponseRedirect('/account/signup/complete/') diff --git a/templates/account/new_account_email.txt b/templates/account/new_account_email.txt index fc1ebbfe..2ca21165 100644 --- a/templates/account/new_account_email.txt +++ b/templates/account/new_account_email.txt @@ -3,6 +3,6 @@ PostgreSQL community account. Please go to the following page and choose a new password: -https://wwwmaster.postgresql.org/account/reset/{{uid}}-{{token}}/ +{{mastersite}}/account/reset/{{uid}}-{{token}}/ Your username, in case you've forgotten, is {{user.username}}. diff --git a/templates/core/moderation_report.txt b/templates/core/moderation_report.txt index 44820c83..6f6de91a 100644 --- a/templates/core/moderation_report.txt +++ b/templates/core/moderation_report.txt @@ -5,4 +5,4 @@ The following items are currently pending moderation: Moderators; please check and moderate these items as soon as possible! -https://wwwmaster.postgresql.org/admin/pending/ +{{mastersite}}/admin/pending/ diff --git a/tools/moderation/moderation_report.py b/tools/moderation/moderation_report.py index 2fbcd59d..f7adf7db 100755 --- a/tools/moderation/moderation_report.py +++ b/tools/moderation/moderation_report.py @@ -21,4 +21,5 @@ if len(counts): "core/moderation_report.txt", { 'items': counts, + 'mastersite': settings.MASTERSITE_ROOT, }) -- 2.39.5