Commit 49160133 authored by Ysabella Panghulan's avatar Ysabella Panghulan

created EventDetailView in views.py

parent 283f872b
from django.shortcuts import render, redirect from django.shortcuts import render, redirect
from django.http import HttpResponse from django.http import HttpResponse
from .models import Location, Event from .models import Location, Event
from django.views.generic.detail import DetailView
# Create your views here. # Create your views here.
def Calendar(request): def Calendar(request):
...@@ -11,3 +12,7 @@ def Calendar(request): ...@@ -11,3 +12,7 @@ def Calendar(request):
'events': events, 'events': events,
} }
return render(request, 'widget_calendar/calendar.html', context) return render(request, 'widget_calendar/calendar.html', context)
class EventDetailView(DetailView):
model = Event
template_name = 'widget_calendar/event-details.html'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment