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