From caa91ebc28c887c3c3c36e1088cb1e52882a0ded Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 6 Dec 2011 04:12:18 +0530 Subject: [PATCH] emailer display for email --- itf/emailer/views.py | 14 +++++ itf/templates/emailer/email.html | 91 ++++++++++++++++++++++++++++++++ itf/urls.py | 1 + 3 files changed, 106 insertions(+) create mode 100644 itf/templates/emailer/email.html diff --git a/itf/emailer/views.py b/itf/emailer/views.py index 60f00ef..06c9fc8 100644 --- a/itf/emailer/views.py +++ b/itf/emailer/views.py @@ -1 +1,15 @@ # Create your views here. +from django.shortcuts import render_to_response, get_object_or_404 +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 = IssueArticle.objects.filter(issue=issue) + return render_to_response("emailer/email.html", { + 'issue': issue, + 'weblinks': weblinks, + 'bbitems': bbitems, + 'articles': articles + }) diff --git a/itf/templates/emailer/email.html b/itf/templates/emailer/email.html new file mode 100644 index 0000000..d7ebe1a --- /dev/null +++ b/itf/templates/emailer/email.html @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + +
+ itf-logo +

Issue No: {{ issue.issue_no }}

+

{{ issue.date|date:"d-M-Y" }}

+
+ erang-logo +
+

A fortnightly theatre e-journal from the India Theatre Forum
Co-Editors: Vikram Iyengar, Joyoti Roy

+
 
SUBSCRIBE | FEEDBACK | BULLETIN BOARD | LINKS +   +
+ + + + {% for b in bbitems %} + + {% endfor %} + + +
+

{{ b.title }}

+

{{ b.text|truncate:80 }}

+

More »

+
+ +{% for article in articles %} + + + + + + + + + + +

{{ article.title }}

+ theatre-image +

{{ article.subtitle }}

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

Contribute your articles to e-Rang and become part of this theatre community! Email us at erang@theatreforum.in to know more about how to contribute..

+
+

The India Theatre Forum (ITF), a Prithvi Theatre initiative, was formed in 2006 as a loose association of theatre people coming together in the larger interests of theatre. For more on the ITF, please visit www.theatreforum.in. The ITF is currently supported by HIVOS.

+
+

If you'd prefer not to receive theatre updates and theatre news, simply click here to unsubscribe.

+
+ diff --git a/itf/urls.py b/itf/urls.py index 8b8d2de..c401723 100755 --- a/itf/urls.py +++ b/itf/urls.py @@ -19,6 +19,7 @@ urlpatterns = patterns('', (r'^t/$', "frontpage.views.index"), (r'm/', include('insidepages.urls')), (r'^contact/$', 'frontpage.views.contact'), + (r'^emailer/issue/(?Pd+)', 'emailer.views.show_emailer'), # ('m/(?P.*)', 'insidepages.views.main'), (r'^comments/', include('django.contrib.comments.urls')), (r'^ckeditor/', include('ckeditor.urls')),