diff --git a/RIGS/rigboard.py b/RIGS/rigboard.py index b56ca7d3..23fd5e6a 100644 --- a/RIGS/rigboard.py +++ b/RIGS/rigboard.py @@ -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 diff --git a/RIGS/templates/RIGS/event_embed.html b/RIGS/templates/RIGS/event_embed.html new file mode 100644 index 00000000..2c13dd39 --- /dev/null +++ b/RIGS/templates/RIGS/event_embed.html @@ -0,0 +1,122 @@ +{% load static from staticfiles %} +{% load raven %} + + + + +
+ + + + + + + + + + + + + +{% include "analytics.html" %} + + + + +{% block js %} +{% endblock %} + + \ No newline at end of file diff --git a/RIGS/urls.py b/RIGS/urls.py index 16da83da..b0eca4c4 100644 --- a/RIGS/urls.py +++ b/RIGS/urls.py @@ -82,7 +82,10 @@ urlpatterns = patterns('', url(r'^event/(?P