Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
roomlist
Commits
b22fafd3
Commit
b22fafd3
authored
Jun 21, 2017
by
Daniel W Bond
Browse files
better use of dictionaries, now that there's greater replication of code
parent
08d8bf5f
Changes
1
Show whitespace changes
Inline
Side-by-side
roomlist/accounts/views.py
View file @
b22fafd3
...
...
@@ -310,20 +310,16 @@ class DeleteStudent(LoginRequiredMixin, StudentContextMixin, FormView):
subject
=
"You successfully deleted your account on Roomlist"
if
form
.
cleaned_data
[
'leaving'
]:
context
=
{
'subject'
:
subject
,
'student_name'
:
student
.
get_first_name_or_uname
,
'special_message'
:
"We're glad you gave our service a try."
,
'signature'
:
':-)'
,
}
if
form
.
cleaned_data
[
'leaving'
]:
context
[
'special_message'
]
=
"We're glad you gave our service a try."
else
:
context
=
{
'subject'
:
subject
,
'student_name'
:
student
.
get_first_name_or_uname
,
'special_message'
:
"We wish you luck in your time after Mason!"
,
'signature'
:
':-)'
,
}
context
[
'special_message'
]
=
"We wish you luck in your time after Mason!"
to
=
user
.
email
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment