-
導入先のディレクトリを作る
-
導入先のディレクトリに移動する
-
以下のコマンドを実行する
git clone https://github.com/alice37308108/django_breakfast.git .
- 仮想環境を作る
python -m venv venv
- 仮想環境に入る
venv\Scripts\activate
- 必要なパッケージをインストール
pip install -r requirements.txt
- マイグレーション(データベースの設定)
python manage.py migrate
- ローカルサーバーを起動
python manage.py runserver
(サーバの終了は、 [Ctrl] + [C] で)
- ブラウザで管理画面にログイン
http://127.0.0.1:8000/admin/
からログインできることを確かめる
動作確認できたら、 [Ctrl] + [C] でいったんサーバを止める。
- 管理画面ログイン用のスーパーユーザーを作成
python manage.py createsuperuser
- fixture からデータをロード
python manage.py loaddata fixtures/breakfast.json
サンプルデータ投入が済んだら、以下のページ等で表示を確かめてください。
http://127.0.0.1:8000/list/