Commit bc45e3ff authored by Arkadiusz Hiler's avatar Arkadiusz Hiler

mail: Include current Site object in the render context that the emails we send out will include domain in the links.

This was broken somewhere along the migration from dedicated context
objects to a simple dicts.
Reported-by: Eric Engestrom's avatarEric Engestrom <>
Signed-off-by: Arkadiusz Hiler's avatarArkadiusz Hiler <>
parent c4b97236
......@@ -22,6 +22,7 @@ from __future__ import absolute_import
from django.conf import settings as conf_settings
from django.core.mail import send_mail
from django.core.urlresolvers import reverse
from django.contrib.sites.models import Site
from django.http import HttpResponseRedirect
from django.shortcuts import render
from django.template.loader import render_to_string
......@@ -68,7 +69,7 @@ def optin_confirm(request, conf):
def optinout(request, action, description):
context = {}
context = {'site': Site.objects.get_current()}
mail_template = 'patchwork/%s-request.mail' % action
html_template = 'patchwork/%s-request.html' % action
......@@ -127,7 +127,7 @@ def profile(request):
def link(request):
context = {}
context = {'site': Site.objects.get_current()}
if request.method == 'POST':
form = UserPersonLinkForm(request.POST)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment