From dcd59a5e368c5697d18a2fdc258972492a62b613 Mon Sep 17 00:00:00 2001 From: Sanj Date: Sun, 15 Jan 2012 02:55:28 +0530 Subject: [PATCH] emailer --- itf/emailer/views.py | 13 +++------- itf/templates/emailer/email.html | 44 ++++++++++++++++++++++---------- 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/itf/emailer/views.py b/itf/emailer/views.py index f83e48e..55a8d0d 100755 --- a/itf/emailer/views.py +++ b/itf/emailer/views.py @@ -4,12 +4,7 @@ from models import * def show_emailer(request, issue_no): issue = get_object_or_404(EmailerIssue, issue_no=issue_no) - weblinks = Weblink.objects.filter(issue=issue) - bbitems = BulletinBoardItem.objects.filter(issue=issue) - articles = EmailerArticle.objects.filter(issue=issue) - return render_to_response("emailer/email.html", { - 'issue': issue, - 'weblinks': weblinks, - 'bbitems': bbitems, - 'articles': articles - }) +# weblinks = Weblink.objects.filter(issue=issue) +# bbitems = BulletinBoardItem.objects.filter(issue=issue) +# articles = EmailerArticle.objects.filter(issue=issue) + return render_to_response("emailer/email.html", issue.info_dict()) diff --git a/itf/templates/emailer/email.html b/itf/templates/emailer/email.html index e1a5f46..04f2df6 100755 --- a/itf/templates/emailer/email.html +++ b/itf/templates/emailer/email.html @@ -1,5 +1,5 @@ {% load markup %} - +{% load thumbnail %} @@ -28,7 +28,7 @@ @@ -36,20 +36,20 @@
-

SUBSCRIBE | FEEDBACK

+

SUBSCRIBE | FEEDBACK

- + - -

{{ article.subtitle }}

- + {% endfor %}
+

Web Links

Some weblink

Some other weblink

-

More »

+

More »

+

Bulletin Board

Some bb item

Some other bb item

-

More »

+

More »

{{ article.text|markdown }}

+ +

{{ article.text|markdown }}

-

WEB LINKS

-

{{ weblinks.text|markdown }}

+

WEB LINKS

+ {% for weblink in weblinks %} +

{{ weblink.title }}

+
{{ weblink.text|markdown }}
+ {% endfor %} + +
-

BULLETIN BOARD

-

{{ bulletinboard.text|markdown }}

+

BULLETIN BOARD

+ {% for bbitem in bbitems %} +

{{ bbitem.title }}

+
{{ bbitem.text|markdown }}
+ {% endfor %} + +