mirror of
https://github.com/fergalmoran/dss.git
synced 2026-01-06 17:04:30 +00:00
Added some email templates
This commit is contained in:
@@ -261,8 +261,9 @@ mimetypes.add_type("text/xml", ".plist", False)
|
||||
HTML_MINIFY = not localsettings.DEBUG
|
||||
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
EMAIL_HOST = 'localhost'
|
||||
EMAIL_PORT = 1025
|
||||
|
||||
EMAIL_HOST = localsettings.EMAIL_HOST
|
||||
EMAIL_PORT = localsettings.EMAIL_PORT
|
||||
|
||||
if DEBUG:
|
||||
import mimetypes
|
||||
|
||||
@@ -89,7 +89,7 @@ class UserProfile(_BaseModel):
|
||||
def add_follower(self, user):
|
||||
self.followers.add(user)
|
||||
try:
|
||||
notification.send([self.user], "new_follower", {"from_user": "admin@deepsouthsounds.com"})
|
||||
notification.send([self.user], "new_follower", {"profile": user})
|
||||
except Exception, ex:
|
||||
self.logger.warning("Unable to send email for new follower")
|
||||
self.logger.warning("Host: %s" % settings.EMAIL_HOST)
|
||||
|
||||
6
templates/notification/email_body.txt
Normal file
6
templates/notification/email_body.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
{% load i18n %}{% load url from future %}{% url "notification_notices" as notices_url %}{% blocktrans %}You have received the following notice from {{ current_site }}:
|
||||
|
||||
{{ message }}
|
||||
|
||||
To see other notices change how you receive notifications, please go to {{ default_http_protocol }}://{{ current_site }}/me
|
||||
{% endblocktrans %}
|
||||
1
templates/notification/new_follower/full.txt
Normal file
1
templates/notification/new_follower/full.txt
Normal file
@@ -0,0 +1 @@
|
||||
<a href="{{ profile.get_absolute_url }}">{{ profile.get_nice_name }}</a> has started following you.
|
||||
7
templates/notification/new_follower/notice.html
Normal file
7
templates/notification/new_follower/notice.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% load i18n %}
|
||||
{% url invitations as invitation_page %}
|
||||
{% url profile_detail username=invitation.from_user.username as user_url %}
|
||||
{% blocktrans with invitation.from_user as invitation_from_user %}
|
||||
<a href="{{ user_url }}">{{ invitation_from_user }}</a> has started following you on Deep South Sounds
|
||||
(see <a href="{{ invitation_page }}">followers</a>)
|
||||
{% endblocktrans %}
|
||||
1
templates/notification/new_follower/short.txt
Normal file
1
templates/notification/new_follower/short.txt
Normal file
@@ -0,0 +1 @@
|
||||
{% load i18n %}{% blocktrans %}{{ notice }}{% endblocktrans %}
|
||||
Reference in New Issue
Block a user