it/itf/emailer/views.py
2011-12-08 09:49:39 -05:00

16 lines
528 B
Python
Executable File

# 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
})