-Setting.py의 templates의 DIRS에 경로 추가
'DIRS': ['pinterest/templates'],
그래야 템플릿에 연결되어 화면에 나타남
-Accountapp의 views.py에 형식 변경
기존-->
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def hello_world(request):
return HttpResponse('안녕하세요')
형식 변경 내용-->
def hello_world(request):
return render(request, 'base.html')
request를 인자로 받고 render할 페이지를 작성
models.py class 작성 (14강) (0) | 2021.07.15 |
---|---|
static 설정(11강) (0) | 2021.07.15 |
부트스트랩 적용 (10강) (0) | 2021.07.15 |
include와 extends 이용 (pinterest clone 9강) (0) | 2021.07.14 |
django project 시작(pinterest clone 5강) (0) | 2021.07.14 |
댓글 영역