Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (13 sloc) 693 Bytes
from django import template, http
from django.shortcuts import get_object_or_404
from campaign.models import Campaign, BlacklistEntry
def view_online(request, object_id):
campaign = get_object_or_404(Campaign, pk=object_id, online=True)
if campaign.template.html is not None and campaign.template.html != u"":
tpl = template.Template(campaign.template.html)
content_type = 'text/html, charset=utf-8'
tpl = template.Template(campaign.template.plain)
content_type = 'text/plain, charset=utf-8'
return http.HttpResponse(tpl.render(template.Context({})),