Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def show(request):
- if request.method == "POST":
- print('request method is post')
- form = ScheduleForm(request.POST)
- if form.is_valid():
- try:
- form.save()
- return redirect('/view')
- except:
- return HttpResponse('Error')
- else:
- form = ScheduleForm()
- else:
- print('not post')
- return render(request, 'index.html', {'form':form})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement