Commit 3c2d2e09 authored by Michal Čihař's avatar Michal Čihař

Need to pass request object

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent a63cd589
......@@ -82,7 +82,7 @@ class RegistrationTemplateView(TemplateView):
return context
def mail_admins_contact(subject, message, context, sender):
def mail_admins_contact(request, subject, message, context, sender):
'''
Sends a message to the admins, as defined by the ADMINS setting.
'''
......@@ -240,6 +240,7 @@ def contact(request):
form = ContactForm(request.POST)
if form.is_valid():
mail_admins_contact(
request,
'%(subject)s',
CONTACT_TEMPLATE,
form.cleaned_data,
......@@ -273,6 +274,7 @@ def hosting(request):
form = HostingForm(request.POST)
if form.is_valid():
mail_admins_contact(
request,
'Hosting request for %(project)s',
HOSTING_TEMPLATE,
form.cleaned_data,
......
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