Permalink
Browse files

added support for DEFAULT_HTTP_PROTOCOL settings fallback

  • Loading branch information...
1 parent f471522 commit 087d2a6a3b401fc53c73f2b187bed4eb18575ad5 @brosner brosner committed Oct 21, 2009
Showing with 5 additions and 2 deletions.
  1. +5 −2 notification/models.py
@@ -246,11 +246,14 @@ def send_now(users, label, extra_context=None, on_site=True):
"""
if extra_context is None:
extra_context = {}
-
+
notice_type = NoticeType.objects.get(label=label)
+ protocol = getattr(settings, "DEFAULT_HTTP_PROTOCOL", "http")
current_site = Site.objects.get_current()
- notices_url = u"http://%s%s" % (
+
+ notices_url = u"%s://%s%s" % (
+ protocol,
unicode(current_site),
reverse("notification_notices"),
)

0 comments on commit 087d2a6

Please sign in to comment.