summaryrefslogtreecommitdiff
path: root/django/contrib/admin
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2006-07-21 16:20:22 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2006-07-21 16:20:22 +0000
commite9a236d86c82133ab1959e4ea4760ebe6f73bd8e (patch)
tree3a8f05df528fc6b5c853cb66c3718d6c33af7654 /django/contrib/admin
parent8bdd19beea3002d8b99cbaaab9624dca8f7a8694 (diff)
Fixed #2092: added a "is_secure()" method to HttpRequest which correctly handles the subtleties of mod_python's interaction with os.environ. This one's been bugging me for about a *year*, so many many thanks to k.shaposhnikov@gmail.com for figuring it out, and Tim Shaffer for pointing out this ticket.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3410 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/admin')
-rw-r--r--django/contrib/admin/views/doc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/views/doc.py b/django/contrib/admin/views/doc.py
index 5aa143e1fd..68799fcc17 100644
--- a/django/contrib/admin/views/doc.py
+++ b/django/contrib/admin/views/doc.py
@@ -28,7 +28,7 @@ def bookmarklets(request):
# Hack! This couples this view to the URL it lives at.
admin_root = request.path[:-len('doc/bookmarklets/')]
return render_to_response('admin_doc/bookmarklets.html', {
- 'admin_url': "%s://%s%s" % (os.environ.get('HTTPS') == 'on' and 'https' or 'http', get_host(request), admin_root),
+ 'admin_url': "%s://%s%s" % (request.is_secure() and 'https' or 'http', get_host(request), admin_root),
}, context_instance=RequestContext(request))
bookmarklets = staff_member_required(bookmarklets)