Commit b22fafd3 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

better use of dictionaries, now that there's greater replication of code

parent 08d8bf5f
...@@ -310,20 +310,16 @@ class DeleteStudent(LoginRequiredMixin, StudentContextMixin, FormView): ...@@ -310,20 +310,16 @@ class DeleteStudent(LoginRequiredMixin, StudentContextMixin, FormView):
subject = "You successfully deleted your account on Roomlist" subject = "You successfully deleted your account on Roomlist"
context = {
'subject': subject,
'student_name': student.get_first_name_or_uname,
'signature': ':-)',
}
if form.cleaned_data['leaving']: if form.cleaned_data['leaving']:
context = { context['special_message'] = "We're glad you gave our service a try."
'subject': subject,
'student_name': student.get_first_name_or_uname,
'special_message': "We're glad you gave our service a try.",
'signature': ':-)',
}
else: else:
context = { context['special_message'] = "We wish you luck in your time after Mason!"
'subject': subject,
'student_name': student.get_first_name_or_uname,
'special_message': "We wish you luck in your time after Mason!",
'signature': ':-)',
}
to = user.email to = user.email
......
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