Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
93e6434e
Commit
93e6434e
authored
May 19, 2015
by
Randy Ostler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create email message only when it will be sent
parent
470f613b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
common/djangoapps/student/views.py
+11
-11
No files found.
common/djangoapps/student/views.py
View file @
93e6434e
...
@@ -1537,17 +1537,6 @@ def create_account_with_params(request, params):
...
@@ -1537,17 +1537,6 @@ def create_account_with_params(request, params):
create_comments_service_user
(
user
)
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:
# Don't send email if we are:
#
#
# 1. Doing load testing.
# 1. Doing load testing.
...
@@ -1565,6 +1554,17 @@ def create_account_with_params(request, params):
...
@@ -1565,6 +1554,17 @@ def create_account_with_params(request, params):
not
(
do_external_auth
and
settings
.
FEATURES
.
get
(
'BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH'
))
not
(
do_external_auth
and
settings
.
FEATURES
.
get
(
'BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH'
))
)
)
if
send_email
:
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
(
from_address
=
microsite
.
get_value
(
'email_from_address'
,
'email_from_address'
,
settings
.
DEFAULT_FROM_EMAIL
settings
.
DEFAULT_FROM_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