[Django 3] Hello World 웹사이트 만들기
Djnago프로젝트를 시작하는 가장 쉽고 빠른 7가지 단계.
1. project 생성
django-admin startproject helloworld
2. app 생성
python manage.py startapp print
3. project 와 app 연결하기
helloworld/settings.py 수정
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'print.apps.printConfig',
]4. Template 만들기
print/templates/helloworld.html
5. app 기능 구현하기
print/views.py
6. URL 요청을 views에 연결하기
helloworld/urls.py
urlpattern 작성법
완성된 helloworld/urls.py
7. 서버 실행하기
Last updated