0
0

More than 1 year has passed since last update.

djangoで使うコマンド集(基礎編)

Posted at

仮想環境作成

windows
virtualenv 仮想環境名
cd 仮想環境名
Scripts\activate.bat

Mac
mkdir 仮想環境名
cd 仮想環境名
python3 -m venv 仮想環境名
source 仮想環境名/bin/activate

インストール
pip install Django

プロジェクト作成
django-admin startproject プロジェクト名

簡易サーバー立ち上げ
python manage.py runserver
アクセス先
http://127.0.0.1:8000/

データベースモデル反映
python manage.py makemigrations

python manage.py migrate

管理ページ作成
python manage.py createsuperuser
アクセス先
http://127.0.0.1:8000/admin/

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