template (1) 썸네일형 리스트형 [Django] Django - (맛보기)Template 이번에는 Template에 대해서 알아보겠습니다. Template을 사용하기 위해서는 render 함수를 사용해야 한다. 아래의 절차대로 진행하면 template을 이용하여 view 를 구현할 수 있다. 프로젝트의 settings.py 설정파일 수정 - 프로젝트 폴더 하위에 templates 폴더 생성(/my_site/templates/) # 패키지 추가 import os # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplat.. 이전 1 다음