django

3. 프로젝트 생성

으누아빠 2020. 7. 7. 18:03
반응형

프로젝트 생성

1.virtual environment(가상환경) 생성

PS D:\gongbang> pipenv --three

Successfully created virtual environment!
Virtualenv location: C:\Users\kangi\.virtualenvs\gongbang-EqWlljCo
Creating a Pipfile for this project…

2. pipenv shell 실행

  • 해당 가상환경으로 들어간다 라는 뜻
  • 작업시 반드시 pipenv shell 를 실행한후 작업이 시작되어야 함
PS D:\gongbang> pipenv shell

Launching subshell in virtual environment…
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

3. Django 설치

PS D:\gongbang> pipenv install Django==3.0.8
Installing Django==3.0.8…
Adding Django to Pipfile's [packages]…
Installation Succeeded
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Success!
Updated Pipfile.lock (638a9d)!
Installing dependencies from Pipfile.lock (638a9d)…
  ================================ 4/4 - 00:00:02

4. Djago-admin 을 실행 후 확인

PS D:\gongbang> django-admin

Type 'django-admin help <subcommand>' for help on a specific subcommand.

Available subcommands:

[django]
    check
    compilemessages
    createcachetable
    dbshell
    diffsettings
    dumpdata
    flush
    inspectdb
    loaddata
    makemessages
    makemigrations
    migrate
    runserver
    sendtestemail
    shell
    showmigrations
    sqlflush
    sqlmigrate
    sqlsequencereset
    squashmigrations
    startapp
    startproject
    test
    testserver
Note that only Django core commands are listed as settings are not properly configured (error: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.).

5. Django 설치 완료

'django' 카테고리의 다른 글

6. 국내 서비스를 위한 config/settings.py 수정  (2) 2020.07.09
5. creating a Django Project  (0) 2020.07.09
4. Github 저장소 생성  (0) 2020.07.07
2. pipenv 설치  (0) 2020.07.03
1. python 설치  (0) 2020.07.03