Mercurial > public > sg101
comparison forums/views/subscriptions.py @ 991:4aadaf3bc234
Added SITE_SCHEME setting.
Configure site scheme to be either http or https based on SITE_SCHEME setting.
Updated code to use it.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 01 Nov 2015 15:56:05 -0600 |
parents | ee87ea74d46b |
children | e932f2ecd4a7 |
comparison
equal
deleted
inserted
replaced
990:81b96f3c9e59 | 991:4aadaf3bc234 |
---|---|
31 'email', flat=True) | 31 'email', flat=True) |
32 | 32 |
33 if recipients: | 33 if recipients: |
34 site = Site.objects.get_current() | 34 site = Site.objects.get_current() |
35 subject = "[%s] Topic Reply: %s" % (site.name, topic.name) | 35 subject = "[%s] Topic Reply: %s" % (site.name, topic.name) |
36 url_prefix = "http://%s" % site.domain | 36 url_prefix = "%s://%s" % (settings.SITE_SCHEME, site.domain) |
37 post_url = url_prefix + post.get_absolute_url() | 37 post_url = url_prefix + post.get_absolute_url() |
38 unsubscribe_url = url_prefix + reverse("forums-manage_subscriptions") | 38 unsubscribe_url = url_prefix + reverse("forums-manage_subscriptions") |
39 msg = render_to_string("forums/topic_notify_email.txt", { | 39 msg = render_to_string("forums/topic_notify_email.txt", { |
40 'poster': post.user.username, | 40 'poster': post.user.username, |
41 'topic_name': topic.name, | 41 'topic_name': topic.name, |