(+) 이전 강좌 이어서
__pychahe__
/ pragmatic - __pychahe__
삭제 필요__pycache__/
추가HTML을 사용해 장고 템플릿을 어떻게 활용하는지?
▶ 이 둘을 합쳐서 Response View 반환
def hello_world(request):
return HttpResponse('안녕하세요')
↓
def hello_world(request):
return render(request, 'base.html')
→ settings.py - TEMPLATES - 'DIRS' : 생성한 html 파일 연결해줘야 함
'DIRS': [os.path.join(BASE_DIR, 'templates')]