summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-08-06 00:06:51 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-08-06 00:06:51 -0600
commit004317994057a974e36dab450f388005386bf209 (patch)
treea1ec58537152d28a783bcb349c151f4d1e336171 /public
parent4ec2197deab2f7df1cb94a6506fac9127b3ae414 (diff)
parentd4731a373ca665d4547eb0e89cdf270d41c44243 (diff)
Merge branch 'archweb-generic'
# Conflicts: # public/tests.py # templates/base.html
Diffstat (limited to 'public')
-rw-r--r--public/tests.py6
-rw-r--r--public/views.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/public/tests.py b/public/tests.py
index d0140e98..1e741f16 100644
--- a/public/tests.py
+++ b/public/tests.py
@@ -22,7 +22,7 @@ class PublicTest(TestCase):
# Parabola has no SVN.
self.assertEqual(response.status_code, 404)
- def test_developers(self):
+ def test_developers_old(self):
response = self.client.get('/developers/')
self.assertEqual(response.status_code, 301)
self.assertTrue(response['Location'].endswith('/hackers/'))
@@ -31,9 +31,9 @@ class PublicTest(TestCase):
response = self.client.get('/hackers/')
self.assertEqual(response.status_code, 200)
- def test_fellows(self):
+ def test_fellows_old(self):
response = self.client.get('/fellows/')
- self.assertEqual(response.status_code, 200)
+ self.assertEqual(response.status_code, 301)
def test_donate(self):
response = self.client.get('/donate/')
diff --git a/public/views.py b/public/views.py
index af0c1ff6..1002c8c7 100644
--- a/public/views.py
+++ b/public/views.py
@@ -25,10 +25,12 @@ def index(request):
else:
def updates():
return get_recent_updates()
+ domain = "%s://%s" % (request.scheme, request.META.get('HTTP_HOST'))
context = {
'news_updates': News.objects.order_by('-postdate', '-id')[:15],
'pkg_updates': updates,
'staff_groups': StaffGroup.objects.all(),
+ 'domain': domain,
}
return render(request, 'public/index.html', context)