Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kszkepzes-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
JetBrains YouTrack
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
KSZK
DevTeam
kszkepzes
old
kszkepzes-backend
Commits
31318c7c
Verified
Commit
31318c7c
authored
3 years ago
by
Rafael László
Browse files
Options
Downloads
Patches
Plain Diff
fix flake errors
parent
e47c25cd
Branches
Branches containing commit
Tags
1.3.0
Tags containing commit
No related merge requests found
Pipeline
#19612
canceled
3 years ago
Stage: Test and Flake8
Stage: Docker Build
Stage: deploy
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/email.py
+10
-8
10 additions, 8 deletions
src/common/email.py
with
10 additions
and
8 deletions
src/common/email.py
+
10
−
8
View file @
31318c7c
import
os
from
django.core.mail
import
send_mail
,
EmailMessage
from
django.core.mail
import
EmailMessage
import
codecs
import
sys
SENDER_EMAIL
=
os
.
getenv
(
'
SENDER_MAIL
'
,
'
kepzes@kszk.bme.hu
'
)
HOMEWORK_LINK
=
os
.
getenv
(
'
HOMEWORK_LINK
'
,
'
https://ujonc.kszk.bme.hu/homework
'
)
HOMEWORK_LINK
=
os
.
getenv
(
'
HOMEWORK_LINK
'
,
'
https://ujonc.kszk.bme.hu/homework
'
)
def
get_full_name
(
user
):
...
...
@@ -20,7 +21,8 @@ def read_email(name):
def
send_out_mail
(
subject
,
message
,
SENDER_EMAIL
,
receiver_email
):
if
'
runserver
'
in
sys
.
argv
:
# It is in development
print
(
"
Email sent from:
"
+
str
(
SENDER_EMAIL
)
+
"
to:
"
+
str
(
receiver_email
))
print
(
"
Email sent from:
"
+
str
(
SENDER_EMAIL
)
+
"
to:
"
+
str
(
receiver_email
))
else
:
email
=
EmailMessage
(
subject
=
subject
,
...
...
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