본문 바로가기

Django

Django 프로젝트 만들기 및 서버 기동

반응형

 

Writing your first Django app, part 1 | Django documentation | Django

Writing your first Django app, part 1 ¶ Let’s learn by example. Throughout this tutorial, we’ll walk you through the creation of a basic poll application. It’ll consist of two parts: A public site that lets people view polls and vote in them. An admin site that lets you add, change, and delete polls...

docs.djangoproject.com

  • 오른쪽 정렬왼쪽 정렬가운데 정렬
  •  
  • 삭제
$ django-admin startproject SunnyBlog
 

- 위의 명령어로 새로운 Django Project를 시작한다.

- 생성 된 파일들

대표사진 삭제

사진 설명을 입력하세요.

- 바깥쪽의 SunnyBlog는 프로젝트의 컨테이너입니다.

- manage.py : 다양한 방법으로 Django 프로젝트의 소통하는 command-line 유틸리티

manage.py 상세 설명 : https://docs.djangoproject.com/en/4.0/ref/django-admin/

django-admin and manage.py | Django documentation | Django

django-admin and manage.py ¶ django-admin is Django’s command-line utility for administrative tasks. This document outlines all it can do. In addition, manage.py is automatically created in each Django project. It does the same thing as django-admin but also sets the DJANGO_SETTINGS_MODULE environme...

docs.djangoproject.com

- 안쪽 SunnyBlog는 실제로 사용자가 구현하는 Python 패키지

- settings.py : Django 프로젝트 설정.

- url.py : 프로젝트의 url 선언

- asgi : asgi entry-point

- wsgi : wsgi entry-point

 

2. 서버 기동

$ python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
January 16, 2022 - 06:26:24
Django version 3.1.4, using settings 'SunnyBlog.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
 

3. 결과

대표사진 삭제

사진 설명을 입력하세요.

 

 

반응형

'Django' 카테고리의 다른 글

Django Template을 이용한 html 호출  (0) 2022.02.08
Django Project Setup  (0) 2022.02.08
Django App 만들기  (0) 2022.02.08
Django, 가상환경 설치  (0) 2022.02.08
Django sqlite3 기초  (0) 2022.02.08