Commit 6a9f8c42 authored by Ysabella Panghulan's avatar Ysabella Panghulan

created EventUpdateView in views.py

parent 49e0c7fe
......@@ -2,7 +2,8 @@ from django.shortcuts import render, redirect
from django.http import HttpResponse
from .models import Location, Event
from django.views.generic.detail import DetailView
from django.views.generic.edit import CreateView
from django.views.generic.edit import UpdateView
from .forms import LocationForm, EventForm
# Create your views here.
def Calendar(request):
......@@ -34,3 +35,8 @@ class EventCreateView(CreateView):
'form': form
}
return render(request, 'widget_calendar/event-add.html', context)
class EventUpdateView(UpdateView):
model = Event
fields = '__all__'
template_name = 'widget_calendar/event-edit.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