Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1b050900
authored
Apr 18, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one: remove hardcoded email address
parent
4a98d32a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
cloud/settings/base.py
+2
-1
one/tasks.py
+12
-8
No files found.
cloud/settings/base.py
View file @
1b050900
...
...
@@ -259,7 +259,8 @@ FIREWALL_SETTINGS = {
"dns_ip"
:
"152.66.243.60"
,
"dns_ttl"
:
"300"
,
}
SITE_NAME
=
"IK Cloud"
DEFAULT_FROM_EMAIL
=
"noreply@cloud.ik.bme.hu"
EMAIL_HOST
=
'152.66.243.92'
# giccero ipv4
CLOUD_URL
=
'https://cloud.ik.bme.hu/'
RELEASE
=
subprocess
.
check_output
([
'git'
,
'rev-parse'
,
'--symbolic-full-name'
,
'--abbrev-ref'
,
'HEAD'
])
...
...
one/tasks.py
View file @
1b050900
from
celery.task
import
Task
,
PeriodicTask
from
celery.task
import
Task
import
logging
import
celery
import
os
import
sys
import
time
from
django.core.mail
import
send_mail
from
django.conf
import
settings
from
one.models
import
Instance
logger
=
logging
.
getLogger
(
__name__
)
class
SendMailTask
(
Task
):
def
run
(
self
,
to
,
subject
,
msg
,
sender
=
u'noreply@cloud.ik.bme.hu'
):
send_mail
(
subject
,
msg
,
sender
,
[
to
],
fail_silently
=
False
)
logger
.
info
(
"[django][one][tasks.py]
%
s->
%
s [
%
s]"
%
(
sender
,
to
,
subject
)
)
def
run
(
self
,
to
,
subject
,
msg
,
sender
=
None
):
if
sender
is
None
:
if
settings
.
SITE_NAME
:
sender
=
'"
%
s" <
%
s>'
%
(
settings
.
SITE_NAME
.
replace
(
'"'
,
''
),
settings
.
DEFAULT_FROM_EMAIL
)
else
:
sender
=
settings
.
DEFAULT_FROM_EMAIL
send_mail
(
subject
,
msg
,
sender
,
[
to
,
],
fail_silently
=
False
)
logger
.
info
(
"[django][one][tasks]
%
s->
%
s
%
s"
%
(
sender
,
to
,
subject
))
class
UpdateInstanceStateTask
(
Task
):
...
...
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