From 28d486870de2c68b53e544a7082c991983d0d763 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 28 Jun 2014 13:10:53 -0500 Subject: More changes for move to Django 1.7 The removal of the root `__init__.py` file is so the testing framework does consistent imports of our models now that the loading strategy has changed. Signed-off-by: Dan McGee --- packages/views/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'packages/views/__init__.py') diff --git a/packages/views/__init__.py b/packages/views/__init__.py index c1f0f492..46c99985 100644 --- a/packages/views/__init__.py +++ b/packages/views/__init__.py @@ -27,10 +27,7 @@ @require_safe @cache_control(public=True, max_age=86400) def opensearch(request): - if request.is_secure(): - domain = "https://%s" % request.META['HTTP_HOST'] - else: - domain = "http://%s" % request.META['HTTP_HOST'] + domain = "%s://%s" % (request.scheme, request.META['HTTP_HOST']) return render(request, 'packages/opensearch.xml', {'domain': domain}, -- cgit v1.2.3-54-g00ecf