From 044555e80fe4827981be6d6efddc14b73f4a2e8d Mon Sep 17 00:00:00 2001
From: Amir <amir@localhost.localdomain>
Date: Mon, 5 Oct 2015 15:33:00 +0300
Subject: [PATCH 1/2] Make main web server configurable in searchform

---
 django/archives/mailarchives/templates/searchform.html | 2 +-
 django/archives/mailarchives/views.py                  | 1 +
 django/archives/settings.py                            | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/django/archives/mailarchives/templates/searchform.html b/django/archives/mailarchives/templates/searchform.html
index 0422548..88d5d24 100644
--- a/django/archives/mailarchives/templates/searchform.html
+++ b/django/archives/mailarchives/templates/searchform.html
@@ -1,6 +1,6 @@
 <p>
 </p>
-<form name="searchform" method="get" action="http://www.postgresql.org/search/">
+<form name="searchform" method="get" action="http://{{main_web_server}}/search/">
  <input type="hidden" name="m" value="1" />
 {%if searchform_list%} <input type="hidden" name="l" value="{{searchform_list}}"/>{%endif%}
  <div class="tblBasic">
diff --git a/django/archives/mailarchives/views.py b/django/archives/mailarchives/views.py
index e011827..3acb3e6 100644
--- a/django/archives/mailarchives/views.py
+++ b/django/archives/mailarchives/views.py
@@ -90,6 +90,7 @@ class NavContext(RequestContext):
 def index(request):
 	(groups, listgroupid) = get_all_groups_and_lists()
 	return render_to_response('index.html', {
+			'main_web_server' : settings.MAIN_WEB_SERVER,
 			'groups': [{'groupname': g['groupname'], 'lists': g['lists']} for g in groups],
 			}, NavContext(request, all_groups=groups))
 
diff --git a/django/archives/settings.py b/django/archives/settings.py
index 0a01c3b..665e910 100644
--- a/django/archives/settings.py
+++ b/django/archives/settings.py
@@ -149,6 +149,7 @@ LOGGING = {
 
 # Required for lighttpd
 FORCE_SCRIPT_NAME=""
+MAIN_WEB_SERVER="http://www.postgresql.org"
 
 # Always override!
 MBOX_ARCHIVES_ROOT="/dev/null"
-- 
2.4.3

