Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-wiki
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
OpenEdx
django-wiki
Commits
fbd75ae0
Commit
fbd75ae0
authored
Feb 21, 2013
by
Juan Diego Caballero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Subject changed to a translated string, notification email changed to @example.com
parent
c13d97de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
django_notify/management/commands/notifysendemails.py
+3
-4
django_notify/settings.py
+2
-1
No files found.
django_notify/management/commands/notifysendemails.py
View file @
fbd75ae0
...
...
@@ -8,8 +8,9 @@ from django.contrib.sites.models import Site
from
django.core
import
mail
from
django.core.management.base
import
BaseCommand
,
CommandError
from
django.template.loader
import
render_to_string
from
django.utils.translation
import
ugettext
as
_
from
django_notify
import
models
from
django_notify.settings
import
INTERVALS
,
DEFAULT_EMAIL
,
NOTIFY_SLEEP_TIME
from
django_notify.settings
import
INTERVALS
,
DEFAULT_EMAIL
,
NOTIFY_SLEEP_TIME
,
EMAIL_SUBJECT
class
Command
(
BaseCommand
):
...
...
@@ -24,9 +25,7 @@ class Command(BaseCommand):
def
_send_user_notifications
(
self
,
context
,
connection
):
subject
=
render_to_string
(
'emails/notification_email_subject.txt'
,
context
)
subject
=
''
.
join
(
subject
.
splitlines
())
subject
=
_
(
EMAIL_SUBJECT
)
message
=
render_to_string
(
'emails/notification_email_message.txt'
,
context
)
email
=
mail
.
EmailMessage
(
subject
,
message
,
DEFAULT_EMAIL
,
...
...
django_notify/settings.py
View file @
fbd75ae0
...
...
@@ -18,8 +18,9 @@ ENABLE_ADMIN = getattr(django_settings, "NOTIFY_ENABLE_ADMIN", False)
# to a proper SMTP server, just leave it off...
SEND_EMAILS
=
getattr
(
django_settings
,
"NOTIFY_SEND_EMAILS"
,
False
)
DEFAULT_EMAIL
=
'notifications@django-wiki.org'
EMAIL_SUBJECT
=
"Notifications"
DEFAULT_EMAIL
=
'notifications@example.com'
#NOTIFY_SLEEP_TIME must be greater than 0 to allow for Garbage Collection
NOTIFY_SLEEP_TIME
=
10
...
...
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