from django.http import HttpResponseRedirect from django.shortcuts import render from .forms import CreateEventForm def index(request): return render(request, 'zitap/index.html') def about(request): return render(request, 'zitap/about.html') def create_event(request): if request.method == 'POST': form = CreateEventForm(request.POST) if form.is_valid(): data = form.cleaned_data print(data) #return HttpResponseRedirect('/edit-event') else: form = CreateEventForm() return render(request, 'zitap/create-event.html', {'form': form})