Simple Django Rest Framework

Official django rest framework site here.

Step 1: Preparation
a. Create virtual environtment: virtualenv env
b. Activate virtual environement: venv\Scripts\activate
c. Install django, django rest framwork:
pip install django djangorestframework

Step 2: Create project
a. Create project: django-admin startproject myproject
b. Go to myproject folder: cd myproject

Step 3: Create app
a. Create app: python startapp myapp
b. Add myapp and djangorestframework in INSTALLED_APPS myproject/

Step 4: Create Model, Serializer and ViewSet
a. Create Model, Serializer and ViewSet in myapp/

Step 5: Setup URLs
a. Add in myapp folder. myapp/

b. Update myproject/

Step 6: Make Migration and Migrate
a. Make migration: python makemigrations
b. Migrate: python migrate

Step 7: Run Server
a. Run server: python runserver
b. Access browser:



Software Engineer, Indonesia

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store