summaryrefslogtreecommitdiff
path: root/app/lttr
diff options
context:
space:
mode:
Diffstat (limited to 'app/lttr')
-rw-r--r--app/lttr/admin.py4
-rw-r--r--app/lttr/mailer.py4
-rw-r--r--app/lttr/models.py3
3 files changed, 7 insertions, 4 deletions
diff --git a/app/lttr/admin.py b/app/lttr/admin.py
index d7d68bc..b406613 100644
--- a/app/lttr/admin.py
+++ b/app/lttr/admin.py
@@ -50,5 +50,5 @@ class NewsletterMailingAdmin(admin.ModelAdmin):
@admin.register(MailingStatus)
class MailingStatusAdmin(admin.ModelAdmin):
- list_display = ('newsletter_mailing', 'subscriber', 'status', 'creation_date')
- list_filter = ('status', 'creation_date')
+ list_display = ('newsletter_mailing', 'subscriber', 'status', 'creation_date', 'newsletter')
+ list_filter = ('status', 'creation_date', 'newsletter_mailing__newsletter')
diff --git a/app/lttr/mailer.py b/app/lttr/mailer.py
index 9972ea2..143fbf2 100644
--- a/app/lttr/mailer.py
+++ b/app/lttr/mailer.py
@@ -74,10 +74,10 @@ class SendShit():
from_email, to = 'Scott Gilbertson <sng@luxagraf.net>', subscriber.get_email()
text_content = render_to_string('lttr/emails/friends_plain_text_email.txt', {'object': self.mailing, 'subscriber':subscriber})
html_content = render_to_string('lttr/emails/friends_html_email.html', {'object': self.mailing, 'subscriber':subscriber})
- print(text_content)
+ #print(text_content)
msg = EmailMultiAlternatives(subject, text_content, from_email, [to])
msg.attach_alternative(html_content, "text/html")
- #msg.send()
+ msg.send()
'''
for header, value in self.newsletter.server.custom_headers.items():
diff --git a/app/lttr/models.py b/app/lttr/models.py
index bce6b06..8c0f335 100644
--- a/app/lttr/models.py
+++ b/app/lttr/models.py
@@ -390,6 +390,9 @@ class MailingStatus(models.Model):
status = models.IntegerField(choices=StatusType.choices, null=True)
creation_date = models.DateTimeField(_('creation date'), auto_now_add=True)
+ def newsletter(self):
+ return newsletter_mailing.newsletter
+
def __str__(self):
return '%s : %s : %s' % (self.newsletter_mailing,
self.subscriber,