/React-Django-Tutorial

Web App using Spotify API

Primary LanguagePython

Full Stack Web App using Spotify's API

Referenced from Tech With Tim's React Django Tutorial, but I have edited it to use Functional Components with React Hooks.

Setup Instructions

Install Required Python Modules

pip install django
pip install djangorestframework

Start Web Server

Run the django web server.

py .\manage.py runserver

Install Node Modules

First cd into the frontend folder.

cd frontend

Next install all dependicies.

npm i

Compile the Front-End

Run the production compile script

npm run build

or for development:

npm run dev

Creating The Files

django-admin startproject <project_name>
cd .\<project_name>\
django-admin startapp <folder_name>

Then add app into installed apps of settings.py. Add 'rest_framework" into installed apps.

Making Migrations

py .\manage.py makemigrations
py .\manage.py migrate

Initialising Front-End Folder

npm init -y
npm i webpack webpack-cli --save-dev
npm i @babel/core babel-loader @babel/preset-env @babel/preset-react --save-dev
npm i react react-dom --save-dev
npm install @material-ui/core
npm install @babel/plugin-proposal-class-properties
npm install react-router-dom
npm install @material-ui/icons