3
4

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 3 years have passed since last update.

【django】環境構築手順の忘備録

Posted at

TL;DR

python + djangoを使用した開発のための環境構築手順の忘備録

手順

フォルダ作成

> cd work
> mkdir sample
> cd sample

仮想環境作成

> python -m venv develop

仮想環境の有効化

> source develop/bin/activate

必要なライブラリのインストール

> pip install django

djangoプロジェクトの作成

> django-admin startproject myporject

作成したdjangoプロジェクトへ移動

> cd myproject

マイグレーション実施

> python manage.py makemigrations
> python manage.py migrate

スーパユーザーの作成

コマンドを打ち込んだあとに、ユーザ名やメールアドレス、パスワードを設定する。

> python manage.py createsuperuser

サーバーを起動

> python manage.py runserver
3
4
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
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?