WEB/HTML1 [Web] HTML 에서 for문 쓰기 Django 프로젝트를 진행하던 중, views.py에서 html파일로 context를 넘겨줬다. 이 때, context를 리스트로 넘겨주었고, html 파일에서 리스트의 크기만큼 태그를 만들고싶었다. html을 너무 오랜만에 써봐서, javascript로 for문 + document.write()를 돌려서 div를 만들어야하나.. 생각하던 중 # views.py .... # 위에 내용 더 있음 if result.answer == result.result: result.correct = 'correct' result.save() result_list.append(result) result = Result.objects.filter(model=model) model.accuracy = result.filt.. 2022. 11. 26. 이전 1 다음