def update(request): title = request.POST['title'] contents = request.POST['content'] no = request.GET['no'] models.update(title, contents, no) return HttpResponseRedirect('/board/views?no=' + no)
def modify(request): board_no = request.POST['board_no'] title = request.POST['title'] content = request.POST['content'] boardmodel.update(board_no, title, content) return HttpResponseRedirect('/board?no={}'.format(board_no))
def modify(request): title = request.POST['title'] content = request.POST['content'] no = request.POST['no'] boardmodels.update(title, content, no) return HttpResponseRedirect('/board/view?no={}'.format(no))
def update( request ): # 글수정 페이지에서 수정버튼 누른 경우(template/board/updateform.html 에서 action 부분) no = request.POST['no'] title = request.POST['title'] content = request.POST['content'] models.update(no, title, content) return HttpResponseRedirect('/board')
def view_modify(request): title = request.POST['title'] content = request.POST['content'] id =int(request.GET['id']) models.update(title, content, int(id)) return HttpResponseRedirect('/board/view?id='+str(id))
def update(request): no = request.session['authuser']['no'] name = request.POST['name'] password = request.POST['password'] gender = request.POST['gender'] models.update(no, name, password, gender) request.session['authuser'] = {'no': no, 'name': name} return HttpResponseRedirect('/board/updateform')
def update(request): authuser = request.session.get('authuser') # 로그인이 안된 상태에서의 접근인지 확인. if authuser is None: return HttpResponseRedirect('/user/loginform') ano = request.POST['post_id'] result = models.listbyno(ano) if result['bno'] != authuser['no']: # 비정상 로그인일 때 메인으로. return HttpResponseRedirect('/') title = request.POST['title'] contents = request.POST['contents'] models.update(ano, title, contents) return HttpResponseRedirect(f'/board/view?no={ano}')
def update(request): no = request.POST['no'] title = request.POST['title'] contents = request.POST['contents'] boardmodel.update(title, contents, no) return HttpResponseRedirect('/board')