-include LICENSE
+include LICENSE CHANGELOG
recursive-include postman/locale *.po *.mo
-recursive-include postman/medias *
+recursive-include postman/static *
recursive-include postman/templates *.html *.txt
graft docs
--prune docs/_build
++prune docs/_build
{% load url from future %}
{% load i18n %}{% load postman_tags %}
{% block title %}{% trans "Messaging" %}{% endblock %}
+{% block extrahead %}{{ block.super }}
+<link type="text/css" media="all" rel="stylesheet" href="
+{# dj v1.4 #}{% load static %}{% static 'postman/css/postman.css' %}
+{# dj v1.3 #}{# {{ STATIC_URL }}postman/css/postman.css #}
+{# dj v1.2 #}{# {{ MEDIA_URL }}postman/css/postman.css #}
+" />{% endblock %}
{% block postman_menu %}
<ul id="postman_menu">{% postman_unread as unread_count %}
- <li><a href="{% url 'postman_inbox' %} ">» {% trans "Inbox" %}{% if unread_count %} <strong>({{ unread_count }})</strong>{% endif %}</a></li>
- <li><a href="{% url 'postman_sent' %} ">» {% trans "Sent Messages" %}</a></li>
- <li><a href="{% url 'postman_write' %} ">» {% trans "Write" %}</a></li>
- <li><a href="{% url 'postman_archives' %} ">» {% trans "Archives" %}</a></li>
- <li><a href="{% url 'postman_trash' %} ">» {% trans "Trash" %}</a></li>
+ <li><a href="{% url 'postman_inbox' %}">» {% trans "Inbox" %}{% if unread_count %} <strong>({{ unread_count }})</strong>{% endif %}</a></li>
+ <li><a href="{% url 'postman_sent' %}">» {% trans "Sent Messages" %}</a></li>
+ <li><a href="{% url 'postman_write' %}">» {% trans "Write" %}</a></li>
+ <li><a href="{% url 'postman_archives' %}">» {% trans "Archives" %}</a></li>
+ <li><a href="{% url 'postman_trash' %}">» {% trans "Trash" %}</a></li>
</ul>
--{% endblock %}
++{% endblock %}
<button type="submit">{% trans "Send" %}</button>
</form>
</div>
--{% endblock %}
++{% endblock %}
def test_notification_rejection_user(self):
"Test notify_users() for rejection, sender is a User."
++<<<<<<< HEAD
m = Message.objects.create(subject='s', moderation_status=STATUS_REJECTED, sender = self.user1, recipient=self.user2)
self.check_notification(m, 1, self.user1.email, is_auto_moderated=False, notice_label='postman_rejection')
def test_notification_rejection_user_auto_moderated(self):
"Test notify_users() for rejection, sender is a User, and is alerted online."
m = Message.objects.create(subject='s', moderation_status=STATUS_REJECTED, sender = self.user1, recipient=self.user2)
++=======
++ m = Message.objects.create(subject='s', moderation_status=STATUS_REJECTED, sender = self.user1, recipient=self.user2)
++ self.check_notification(m, 1, self.user1.email, is_auto_moderated=False, notice_label='postman_rejection')
++
++ def test_notification_rejection_user_auto_moderated(self):
++ "Test notify_users() for rejection, sender is a User, and is alerted online."
++ m = Message.objects.create(subject='s', moderation_status=STATUS_REJECTED, sender = self.user1, recipient=self.user2)
++>>>>>>> dcea2b745ee6fac6ad1721470356616cc4db68fd
self.check_notification(m, 0, is_auto_moderated=True)
def test_notification_rejection_user_inactive(self):
if name and name in settings.INSTALLED_APPS:
send_mail = __import__(name, globals(), locals(), ['send_mail']).send_mail
else:
- from django.core.mail import send_mail
+ from django.core.mail import send_mail, mail_admins
+
+ # to disable email notification to users
+ DISABLE_USER_EMAILING = getattr(settings, 'POSTMAN_DISABLE_USER_EMAILING', False)
+# to disable email notification to users
+DISABLE_USER_EMAILING = getattr(settings, 'POSTMAN_DISABLE_USER_EMAILING', False)
+
# default wrap width; referenced in forms.py
WRAP_WIDTH = 55
else:
return
if notification:
- notification.send(users=[user], label=label, extra_context={'message': object, 'action': action})
+ # the context key 'message' is already used in django-notification/models.py/send_now() (v0.2.0)
+ notification.send(users=[user], label=label, extra_context={'pm_message': object, 'pm_action': action})
else:
- if not DISABLE_USER_EMAILING and user.email:
- email('postman/email_user_subject.txt', 'postman/email_user.txt',[user.email], object, action)
+ if not DISABLE_USER_EMAILING and user.email and user.is_active:
+ email('postman/email_user_subject.txt', 'postman/email_user.txt', [user.email], object, action)
+