it/itf/emailer/views.py

16 lines
526 B
Python
Raw Normal View History

2011-12-01 21:12:20 +00:00
# Create your views here.
2011-12-05 22:42:18 +00:00
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
})