Use correct protocol in shared links (https/http)
This commit is contained in:
@@ -16,6 +16,7 @@ from django.conf import settings
|
||||
## want here (and on this whole page, really).
|
||||
<%
|
||||
site_domain = static.get_value('site_domain', settings.SITE_NAME)
|
||||
site_protocol = 'https' if settings.HTTPS == 'on' else 'http'
|
||||
platform_name = static.get_platform_name()
|
||||
|
||||
## Translators: This text will be automatically posted to the student's
|
||||
@@ -24,7 +25,8 @@ from django.conf import settings
|
||||
number=course.number,
|
||||
title=course.display_name_with_default_escaped,
|
||||
account=static.get_value('course_about_twitter_account', settings.PLATFORM_TWITTER_ACCOUNT),
|
||||
url=u"http://{domain}{path}".format(
|
||||
url=u"{protocol}://{domain}{path}".format(
|
||||
protocol=site_protocol,
|
||||
domain=site_domain,
|
||||
path=urllib.quote_plus(
|
||||
reverse('about_course', args=[course.id.to_deprecated_string()])
|
||||
@@ -41,7 +43,8 @@ from django.conf import settings
|
||||
number=course.number,
|
||||
title=course.display_name_with_default_escaped,
|
||||
platform=platform_name,
|
||||
url=u"http://{domain}{path}".format(
|
||||
url=u"{protocol}://{domain}{path}".format(
|
||||
protocol=site_protocol,
|
||||
domain=site_domain,
|
||||
path=urllib.quote_plus(
|
||||
reverse('about_course', args=[course.id.to_deprecated_string()]),
|
||||
|
||||
Reference in New Issue
Block a user