Modern Django: Part 4: Adding authentication to React SPA using DRF

In the last post we managed to create/read/update/delete notes directly into the database using the API created by Django Rest Framework with a React Frontend. In this one will we allow users to maintain separate notes and protect them using authentication. The code for this repository is hosted on my github, v1k45/ponynote. You can checkout branch part-4 to see all the changes done till the end of this part. Associating notes with users In order to allow users have separate notes, we’ll need to associate notes with users. We’ll start by adding an owner field to the Note model. Update notes/models.py: ...

April 13, 2018 · 18 min · Vikas

Modern Django: Part 3: Creating an API and integrating with React

In the last post we developed a frontend for our note taking application which has the ability to store notes client-side using redux store. In this part we will create database models and APIs to create, read, update and delete notes in a database using react frontend and redux store. The code for this repository is hosted on my github, v1k45/ponynote. You can checkout part-3 branch to see all the changes done till the end of this part. ...

March 3, 2018 · 8 min · Vikas

Modern Django: Part 2: Redux and React Router setup

This is the second part of the tutorial series on how to create a “Modern” web application or SPA using Django and React.js In this part, we’ll setup redux and react router in our note taking application. And later connect this frontend to an API backend. The code for this repository is hosted on my github, v1k45/ponynote. You can checkout part-2 branch to see all the changes done till the end of this part. ...

March 2, 2018 · 10 min · Vikas

Modern Django: Part 1: Setting up Django and React

Introduction This will be a multi part tutorial series on how to create a “Modern” web application or SPA using Django and React.js. We will create a Note taking Single Page Application which will be rendered by ReactJS with Django as an API backend. Let’s call it “ponynote”, because ponies are quite popular within django community. We will be using multiple libraries in this project, mainly, django-rest-framework for creating APIs easily, react-router-dom for handling in-app routing, redux for maintaing global application state. ...

October 5, 2017 · 10 min · Vikas