it/itf/emailer/views.py
2011-12-06 04:22:42 +05:30

16 lines
528 B
Python

# 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 = EmailerArticle.objects.filter(issue=issue)
return render_to_response("emailer/email.html", {
'issue': issue,
'weblinks': weblinks,
'bbitems': bbitems,
'articles': articles
})