반응형 templates1 Django 이미지 1. App폴더 안에 templates 폴더 생성2. templates폴더 안에 App폴더와 같은 이름의 폴더 생성3. 생성한 templates/App폴더 안에 index.html 파일 생성touch 경로/index.html4. 보여질 화면을 만든다.index.html{% if latest_question_list %} {% for question in latest_question_list %} {{ question.question_text }} {% endfor %} {% else %} No polls are available.{% endif %}5. index클래스에 방금전에 index.html로 만든 화면을 불러오는 코드를 작성한다.polls/views.py.. 2025. 6. 10. 이전 1 다음 반응형