1
0

More than 1 year has passed since last update.

Mac: DjangoRestFrameworkを利用したdjangoプロジェクト立ち上げ時のメモ

Posted at

まずはanacondaを利用して仮想環境を起動する。

毎回インストールが必要になるものは下記の三つ

pip install django
pip install djangorestframework
pip install django-filter 

djangorestframeworkはdjangoでAPIを作成するのに必要な肝となるもの。
django-filterを使うことでクエリパラメータのキーにモデルのフィールド名を入れて、バリュー値で検索が可能になる。


django-admin startproject test_project
cd test_project
django-admin startapp testapp

プロジェクトを作成し、manage.pyなどプロジェクトに必要なものも自動で追加する。
その後プロジェクト内にアプリを作成する。アプリは複数作成可能。

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