mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-23 16:32:15 +00:00
Initial proof of concept
This commit is contained in:
@@ -14,6 +14,7 @@ from django.db.models import Q
|
||||
from django.contrib import messages
|
||||
from z3c.rml import rml2pdf
|
||||
from PyPDF2 import PdfFileMerger, PdfFileReader
|
||||
import simplejson
|
||||
|
||||
from RIGS import models, forms
|
||||
import datetime
|
||||
@@ -46,6 +47,20 @@ class WebCalendar(generic.TemplateView):
|
||||
class EventDetail(generic.DetailView):
|
||||
model = models.Event
|
||||
|
||||
class EventOembed(generic.View):
|
||||
model = models.Event
|
||||
|
||||
def get(self, request, pk=None):
|
||||
|
||||
object = get_object_or_404(self.model, pk=pk)
|
||||
data = {
|
||||
'html': 'this is some html',
|
||||
'version': '1.0',
|
||||
'type': 'rich',
|
||||
}
|
||||
json = simplejson.dumps(data)
|
||||
return HttpResponse(json, content_type="application/json")
|
||||
|
||||
|
||||
class EventCreate(generic.CreateView):
|
||||
model = models.Event
|
||||
|
||||
Reference in New Issue
Block a user