Made embed page, with clickjacking protection turned off

This commit is contained in:
David Taylor
2016-10-06 12:52:33 +01:00
parent 4b94ea7ef2
commit 69b0ff9fae
3 changed files with 134 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ from django.conf import settings
from django.http import HttpResponse
from django.db.models import Q
from django.contrib import messages
from django.views.decorators.clickjacking import xframe_options_exempt
from z3c.rml import rml2pdf
from PyPDF2 import PdfFileMerger, PdfFileReader
import simplejson
@@ -66,6 +67,13 @@ class EventOembed(generic.View):
json = simplejson.JSONEncoderForHTML().encode(data)
return HttpResponse(json, content_type="application/json")
class EventEmbed(EventDetail):
template_name = 'RIGS/event_embed.html'
@xframe_options_exempt
def get(self, request, *args, **kwargs):
return super(EventEmbed, self).get(request, *args, **kwargs)
class EventCreate(generic.CreateView):
model = models.Event