0
1

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で開発するときによく使うコマンドまとめ

Last updated at Posted at 2019-08-22

プロジェクトの作成

django-admin startproject プロジェクト名

アプリケーションの作成

python3 manage.py startapp アプリケーション名

モデルをDBに反映させる

変更差分を検知するマイグレーションファイルを作成
python3 manage.py makemigrations

作成したマイグレーションファイルの変更内容をデータベースに反映
python3 manage.py migrate

開発用サーバを立ち上げる

python3 manage.py runserver 0.0.0.0:8000

静的ファイルを集める

python3 manage.py collectstatic

なんかコマンドが通らなくなった時

export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?