remove1 [Python] 삭제하기(form, remove) [생활코딩] 활용 - 삭제 구현 삭제버튼 만들기 index.py #!/usr/local/bin/python3 print("content-type:text/html; charset=UTF-8\n") import cgi,os files = os.listdir('data') liststr = '' for item in files: liststr = liststr + '{name}'.format(name=item) form = cgi.FieldStorage() if 'id' in form: pageId = form["id"].value description = open('data/'+pageId).read() update_link = 'update'.format(pageId=pageId) delete_actio.. 2020. 8. 23. 이전 1 다음 반응형