def delete(request): id = request.GET['id'] authuser = request.session['authuser'] authid = authuser['name'] models.delete((int(id), authid)) return HttpResponseRedirect('/board')
def delete(request): no = request.session['authuser']['no'] # 로그인한 사람번호 board_user_no = request.GET['user_no'] # 게시글의 작성자 번호 board_no = request.GET['board_no'] # 글 번호 if no == int(board_user_no): boardmodels.delete(board_no) return HttpResponseRedirect('/board') else: return HttpResponseRedirect('/board')
def delete(request): page = int(request.GET['page']) board_cnt = int(request.GET['board_cnt']) board_no = request.GET['no'] board = boardModel.fetchone(board_no) boardModel.delete(board_no, board) if board_cnt == 1 and page > 1: return HttpResponseRedirect(f'/board?page={page - 1}') else: return HttpResponseRedirect(f'/board?page={page}')
def delete(request): # 로그인 확인 authuser = request.session.get('authuser') if authuser is None: return HttpResponseRedirect('/user/reqlogin') no = request.GET['no'] user_no = authuser['no'] result = models.delete(no, user_no) if result: return HttpResponseRedirect('/board') else: return HttpResponseRedirect('/board/delete')
def delete(request): board_no = request.POST['board_no'] boardmodel.delete(board_no) return HttpResponseRedirect('/board')
def delete(request): no = request.POST.get('no','') boardmodel.delete(no) return HttpResponseRedirect('/board')
def delete(request): no = request.GET['no'] boardmodel.delete(no) return HttpResponseRedirect('/board?page=1')