Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
1ca4b3b9
Commit
1ca4b3b9
authored
9 years ago
by
Sarina Canelake
Browse files
Options
Downloads
Plain Diff
Merge pull request #8102 from rando305/master
Create email only when it will be sent
parents
cff56506
93e6434e
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AUTHORS
+1
-0
1 addition, 0 deletions
AUTHORS
common/djangoapps/student/views.py
+11
-11
11 additions, 11 deletions
common/djangoapps/student/views.py
with
12 additions
and
11 deletions
AUTHORS
+
1
−
0
View file @
1ca4b3b9
...
...
@@ -212,3 +212,4 @@ Jolyon Bloomfield <jolyon@mit.edu>
Kyle McCormick <kylemccor@gmail.com>
Jim Cai <jimcai@stanford.edu>
Richard Moch <richard.moch@gmail.com>
Randy Ostler <rando305@gmail.com>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
common/djangoapps/student/views.py
+
11
−
11
View file @
1ca4b3b9
...
...
@@ -1537,17 +1537,6 @@ def create_account_with_params(request, params):
create_comments_service_user
(
user
)
context
=
{
'
name
'
:
profile
.
name
,
'
key
'
:
registration
.
activation_key
,
}
# composes activation email
subject
=
render_to_string
(
'
emails/activation_email_subject.txt
'
,
context
)
# Email subject *must not* contain newlines
subject
=
''
.
join
(
subject
.
splitlines
())
message
=
render_to_string
(
'
emails/activation_email.txt
'
,
context
)
# Don't send email if we are:
#
# 1. Doing load testing.
...
...
@@ -1565,6 +1554,17 @@ def create_account_with_params(request, params):
not
(
do_external_auth
and
settings
.
FEATURES
.
get
(
'
BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH
'
))
)
if
send_email
:
context
=
{
'
name
'
:
profile
.
name
,
'
key
'
:
registration
.
activation_key
,
}
# composes activation email
subject
=
render_to_string
(
'
emails/activation_email_subject.txt
'
,
context
)
# Email subject *must not* contain newlines
subject
=
''
.
join
(
subject
.
splitlines
())
message
=
render_to_string
(
'
emails/activation_email.txt
'
,
context
)
from_address
=
microsite
.
get_value
(
'
email_from_address
'
,
settings
.
DEFAULT_FROM_EMAIL
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment