Merge lp:~raj-abhilash1/postorius/lp1437866 into lp:postorius

Proposed by Abhilash Raj
Status: Merged
Merged at revision: 212
Proposed branch: lp:~raj-abhilash1/postorius/lp1437866
Merge into: lp:postorius
Diff against target: 38 lines (+11/-2)
2 files modified
src/postorius/models.py (+11/-1)
src/postorius/templates/postorius/user_address_activation_sent.html (+0/-1)
To merge this branch: bzr merge lp:~raj-abhilash1/postorius/lp1437866
Reviewer Review Type Date Requested Status
Mailman Coders Pending
Review via email: mp+255981@code.launchpad.net

Description of the change

Fix #1437866 and a duplicate #1430682

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/postorius/models.py'
--- src/postorius/models.py 2015-03-25 12:56:26 +0000
+++ src/postorius/models.py 2015-04-13 15:16:21 +0000
@@ -26,6 +26,7 @@
26from datetime import datetime, timedelta26from datetime import datetime, timedelta
27from django.conf import settings27from django.conf import settings
28from django.contrib.auth.models import User28from django.contrib.auth.models import User
29from django.core.exceptions import ImproperlyConfigured
29from django.core.urlresolvers import reverse30from django.core.urlresolvers import reverse
30from django.core.mail import send_mail31from django.core.mail import send_mail
31from django.db import models32from django.db import models
@@ -289,7 +290,16 @@
289 {'activation_link': activation_link, 'host_url': host_url})290 {'activation_link': activation_link, 'host_url': host_url})
290 email_subject = getattr(291 email_subject = getattr(
291 settings, 'EMAIL_CONFIRMATION_SUBJECT', u'Confirmation needed')292 settings, 'EMAIL_CONFIRMATION_SUBJECT', u'Confirmation needed')
293 try:
294 sender_address = getattr(settings, 'EMAIL_CONFIRMATION_FROM')
295 except AttributeError:
296 # settings.EMAIL_CONFIRMATION_FROM is not defined, fallback
297 # settings.DEFAULT_EMAIL_FROM as mentioned in the django
298 # docs. At the end just raise a `ImproperlyConfigured` Error.
299 sender_address = getattr(settings, 'DEFAULT_FROM_EMAIL')
300 else:
301 raise ImproperlyConfigured
292 send_mail(email_subject,302 send_mail(email_subject,
293 get_template(template_path).render(template_context),303 get_template(template_path).render(template_context),
294 getattr(settings, 'EMAIL_CONFIRMATION_FROM'),304 sender_address,
295 [self.email])305 [self.email])
296306
=== modified file 'src/postorius/templates/postorius/user_address_activation_sent.html'
--- src/postorius/templates/postorius/user_address_activation_sent.html 2015-01-09 15:40:51 +0000
+++ src/postorius/templates/postorius/user_address_activation_sent.html 2015-04-13 15:16:21 +0000
@@ -7,4 +7,3 @@
7 <h1>{% trans 'Email address activation sent' %}</h1>7 <h1>{% trans 'Email address activation sent' %}</h1>
8 <p>{% trans "A confirmation link has been sent to the email address you submitted. Please check your email account and click on the confirmation link to add this address for your account." %}</p>8 <p>{% trans "A confirmation link has been sent to the email address you submitted. Please check your email account and click on the confirmation link to add this address for your account." %}</p>
9{% endblock main %}9{% endblock main %}
10

Subscribers

People subscribed via source and target branches