django #장고 #장고렌더링 #장고render #django render #장고 템플릿 (1) 썸네일형 리스트형 [django] Django 템플릿과 렌더링하는 방법! + Render 함수 설명 Template = 장고에서 HTML과 같이 화면 구성을 담당하는 것 Rendering을 통해, HttpResponse 객체로 변환된다. 1. Template 디렉토리 만들어주기 현재 foods앱을 작업하고 있으므로, foods앱 안에 templates라는 디렉토리를 만들어준다. templates안에 앱 이름을 그대로 사용한 foods라는 디렉토리를 만들어준다. foods 디렉토리 안에 HTML 파일을 만들어주면 된다. 즉, foods 앱 디렉토리 > templates 디렉토리 > foods 디렉토리 > index.html 파일 = index templates 2. index.html에 우리가 원하는 html 코드를 자유롭게 적어주기 3. Template Render하기 = Template을 유저에게 보.. 이전 1 다음