Uncategorized

Django Query Optimization – Avoiding N + 1 Problems

There are several ways to avoid the N+1 query problem in Django: Use select_related: select_related is a method that performs a SQL join and includes the fields of the related object in the SELECT statement. It’s useful when you have ForeignKey or OneToOneField on your model and you know you’ll be accessing the related object for each item …

Django Query Optimization – Avoiding N + 1 Problems Read More »

How to Use Github Workflow for Django Projects

Designing a GitHub workflow for CI/CD (Continuous Integration and Continuous Deployment) for a Django project involves creating a YAML configuration file that defines the steps to build, test, and deploy your Django application.In this tutorial we will explore a step-by-step guide on how to set up a GitHub workflow for a Django project: Create a …

How to Use Github Workflow for Django Projects Read More »

JWT Authentication System with Django, SSO and DRF

In this tutorial we will create an OpenID Connect and JWT Authentication system with Django, DRF and SimpleJWT and RSA algorithm. First, let’s install the required packages: Next, let’s create a Django app called authentication: python manage.py startapp authentication We’ll define the models, serializers, views, and URLs in the authentication app. In models.py, we’ll define …

JWT Authentication System with Django, SSO and DRF Read More »

Creating A Django Middleware for JWT Authentication and SSO

Middlewares are tools that hooks into Django request and response life cycle. In this tutorial, generated with the assistance of ChatGPT, we will build a middleware for authentication using JWT (Json Web Tokens) and also for SSO (single sign on). Let us start Creating the Middleware import jwt from django.conf import settings from django.http import …

Creating A Django Middleware for JWT Authentication and SSO Read More »

Introduction to Python Watchdog – Monitoring File Systems and Directories

Monitoring is an essential aspect of software engineering. One of the aspect of monitoring is checking and watching files for changes and modifications. There are several libraries that can be used to monitor files and directory for changes. These include inotify guard watchdog etc In this tutorial we will be exploring watchdog – a simple …

Introduction to Python Watchdog – Monitoring File Systems and Directories Read More »

Exploring OpenAI’s ChatGPT – Building Apps in Multi-Languages with ChatGPT

ChatGPT is an amazing AI service created by OpenAI. It has ushered us into the next generation of search engines that is powered by LLM (Large Language Models) and NLP systems. Let us explore this awesome service. First of all you will need to create an account (email and phonenumber as well as the basic …

Exploring OpenAI’s ChatGPT – Building Apps in Multi-Languages with ChatGPT Read More »