What to do when user forgot the password? We need to have a reset password view. User enters there her email address and email with reset link is sent. The reset link contains special information like uid
and token
. When user clicks the reset link, the reset password confirm view is displayed. This view takes the uid
and token
from the link and a new password and send POST
request to the Django server to set a new password. In this post, we will create the reset password functionality with Django Rest Framework and Djoser package.
Django and React Tutorial
Learn how to write SaaS application with Django and React from scratch
Contact us for any questions by filling a form
or
email.
Topic: Django-rest-framework
-
Django Rest Framework Reset Password
Django-rest-framework Backend Boilerplate Password Piotr Płoński, December 29, 2020
-
Django Rest Framework Email Verification
Django-rest-framework Backend Boilerplate Email Piotr Płoński, December 23, 2020
Email verification is an important part of the SaaS application. We will contact the user by email in many cases: for a password reset, announcement of new features, or for sending the invoice. During registration, a user provides the email address. We need to check if the email belongs to the user, and that there are no typos/errors in it. This can be easily done by automatically sending the verification email with an activation link. Such a link contains the unique token assigned to the user. After opening the activation link in the web browser the request is sent to the web application (Django Rest Framework). The web server compares the token from the activation URL with the token stored in the database. If they are the same, the email address is verified.
-
CRUD in Django Rest Framework and React
Django React Backend Frontend Django-rest-framework Boilerplate Piotr Płoński, October 29, 2020
In this artilce, we will create a CRUD (Create, Read, Update, Delete) model in the Django Rest Framework and React. It will be for simple note taking. User will be able to add new note, read all her notes, update note (to upper or lower case), and delete selected note.
-
Token Based Authentication with Django Rest Framework and Djoser
Django Django-rest-framework Token based authentication Djoser Backend Boilerplate Piotr Płoński, October 26, 2020
In this article, we will add token-based authentication REST API with Django Rest Framework and Djoser. The Django Rest Framework is a package for faster building REST APIs with Django. The Djoser provides basic views to handle authentication actions such as create user, login, logout.