Posts

React Django & Mysql to build a full stack job application website

Image
In the earlier tutorials, you created APIs to perform CRUD operations on products table of MYSQL database, and to allow a visitor to register a user account and login to obtain json web token to access protected views. The backend APIs are ready to be accessed by a client app. Now, we create a client app using React to use the APIs. After finishing the client app, we have a full stack job application website using React Django and MYSQ L. The job application website allows a visitor to create an account and login to post new job application form or update an existing one.  To get started with React, you have to install NPM (Node Package Manager) and a code editor. In my machine, i have Node 16.10.0 and NPM 7.24.0 and VS Code. To create React jobapp app, change to a working directory and execute the following command: D:/> npm init react-app jobapp After the initialization complete, jobapp folder of the React app is created in the drive D:. To open the jobapp app in VS Code, launch

User Authentication - Register & Login in Django with Simple JWT & Mysql

Image
In the previous tutorial, you learnt to create Django APIs to perform CRUD operations on MYSQL database and tested the APIs using Django REST framework and Django Admin panel. In most cases, we need to restrict APIs access to only authenticated and authorized users. Django comes with user authentication system that help you develop your secure APIs fast. In this tutorial, you learn to implement user authentication functionality using Django authentication system with Simple JWT that provides a JSON Web Token authorization backend. It allows user registration with username and password. In the login process, a user that provides correct username and password is authenticated and  obtains tokens (refresh and access tokens). A client app accesses restricted APIs has to provide the access token to be verified by Django backend. If the token is valid, the client app is permitted to access the APIs.  To get started with Simple JWT, install the following dependency: pip install djangorest