示例#1
0
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)
示例#2
0
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))
示例#3
0
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))
示例#4
0
文件: views.py 项目: Heez27/mysite
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')
示例#5
0
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))
示例#6
0
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')
示例#7
0
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}')
示例#8
0
def update(request):
    no = request.POST['no']
    title = request.POST['title']
    contents = request.POST['contents']
    boardmodel.update(title, contents, no)
    return HttpResponseRedirect('/board')