1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Djangoのインストールの仕方メモ

Last updated at Posted at 2019-08-10

Djangoをインストール

$ mkdir BeginnerProject
$ cd BeginnerProject
BeginnerProject$ python3 -m venv beginner_venv
BeginnerProject$ source beginner_venv/bin/activate
(beginner_venv) BeginnerProject $ pip install --upgrade pip
(beginner_venv) BeginnerProject $ pip install django
(djangorbos_venv) BeginnerProject $ deactivate

プロジェクトを作る

BeginnerProject$ source beginner_venv/bin/activate
(beginner_venv) BeginnerProject $ django-admin startproject django_blog
(beginner_venv) BeginnerProject $ cd django_blog
(beginner_venv) BeginnerProject $ python manage.py runserver

設定を変える

settings.py
LANGUAGE_CODE = 'ja-JP'
TIME_ZONE = 'Asia/Tokyo'

データベースミグレーションをする

(beginner_venv) BeginnerProject $ python manage.py migrate

今回完成したサイトはこちら
クレジットカードマスター

ではまた!

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?