Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a30de002
authored
Jun 09, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add EMAIL_SUBJECT_PREFIX to notifications
parent
8bc53a3b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
circle/circle/settings/base.py
+2
-0
circle/dashboard/models.py
+1
-1
circle/dashboard/tasks/local_periodic_tasks.py
+2
-1
No files found.
circle/circle/settings/base.py
View file @
a30de002
...
...
@@ -79,6 +79,8 @@ ADMINS = (
(
'Root'
,
'root@localhost'
),
)
EMAIL_SUBJECT_PREFIX
=
get_env_variable
(
'DJANGO_SUBJECT_PREFIX'
,
'[CIRCLE] '
)
# See: https://docs.djangoproject.com/en/dev/ref/settings/#managers
MANAGERS
=
ADMINS
########## END MANAGER CONFIGURATION
...
...
circle/dashboard/models.py
View file @
a30de002
...
...
@@ -86,7 +86,7 @@ class Profile(Model):
use_gravatar
=
BooleanField
(
default
=
False
)
email_notifications
=
BooleanField
(
verbose_name
=
_
(
"Email notifications"
),
default
=
True
,
help_text
=
_
(
'Wether user wants to get digested email notifications.'
))
help_text
=
_
(
'W
h
ether user wants to get digested email notifications.'
))
def
notify
(
self
,
subject
,
template
,
context
=
{},
valid_until
=
None
):
return
Notification
.
send
(
self
.
user
,
subject
,
template
,
context
,
...
...
circle/dashboard/tasks/local_periodic_tasks.py
View file @
a30de002
...
...
@@ -51,7 +51,8 @@ def send_email_notifications():
'url'
:
(
settings
.
DJANGO_URL
.
rstrip
(
"/"
)
+
reverse
(
"dashboard.views.notifications"
)),
'site'
:
settings
.
COMPANY_NAME
}
subject
=
ungettext
(
"
%
d new notification"
,
subject
=
settings
.
EMAIL_SUBJECT_PREFIX
+
ungettext
(
"
%
d new notification"
,
"
%
d new notifications"
,
len
(
msgs
))
%
len
(
msgs
)
body
=
render_to_string
(
'dashboard/notifications/email.txt'
,
context
)
...
...
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