mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-24 00:42:17 +00:00
Made embed page, with clickjacking protection turned off
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user