<루트 프로젝트명>
manage.py
<프로젝트명>/
<APP 이름>/
templates/
<html파일명>.html
<!DOCTYPE html>
<html>
<body>
<h1>Hello World!</h1>
<p>Welcome to my first Django project!</p>
</body>
</html>
from django.http import HttpResponse
from django.template import loader
def members(request):
template = loader.get_template('<html 이름>.html')
return HttpResponse(template.render())
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'<APP 이름>'
]
py manage.py migrate
py manage.py runserver
[Django] CSRF verification failed. Request aborted. 에러 발생시,
[Django] CSRF verification failed. Request aborted. 포스팅 참고👈
migration