def add(request): name = request.POST['name'] password = request.POST['password'] message = request.POST['message'] guestbookmodel.insert(name, password, message) return HttpResponseRedirect('/guestbook01')
def add(request): name = request.POST["name"] password = request.POST["password"] message = request.POST["message"] models.insert(name, password, message) return HttpResponseRedirect("/guestbook01")
def add(request): name = request.POST['name'] password = request.POST['password'] message = request.POST['message'] models.insert(name, password, message) return redirect('guestbook01')
def add(request): name = request.POST[ "name"] #form.html 에서 name 으로 지정해서 보낸 데이터를 가져옴. 그니까 가서 잘 확인을 해야함 password = request.POST["password"] message = request.POST["message"] models.insert(name, password, message) return HttpResponseRedirect("/guestbook01/")
def add(request): name = request.POST['name'] password = request.POST['password'] message = request.POST['message'] models.insert(name, password, message) print(name, password, message) # 리다이렉트 : 결과로 이동 return HttpResponseRedirect("/guestbook01")
def test_insert(): name = '둘리' password = '******' message = '호이~' result = insert(name, password, message) print(f'insert result: {result}')
def test_instert(): name = "DingDong" password = "******" message = "hola hola!" result = insert(name, password, message) print(f"insert result : {result}")
def guestAdd(request): models.insert(request.POST["name"],request.POST["password"],request.POST["message"]) return HttpResponseRedirect("/guestbook01")