Category: Django


JWT token as HttpOnly cookie in Django

It is always recommended to store tokens for authentication as HttpOnly cookie instead of storing them in localStorage as a normal cookie which will not be accessible by JavaScript from the fronten...

HttpOnly cookie in Django

For authentication in a Single page application, it is a common approach to use token-based authentication where a token is sent to the backend for protected routes. Instead of storing the token in...

Django slug tutorial: adding slug field in a django model

In this tutorial, we are going to learn what is a slug and how to add slug or SlugField in a Django model. Slug is just a part of URL which uniquely identifies a page or blog and explains the conte...

Custom User Model in Django

In this tutorial, we will be learning how to create a custom user model or extending user model to add some fields and to grab more control over user model.