#Python

Django & DRF Model Generic Auth Stuff

Tracking who created or updated a record is vital for auditing. This article shows how to automatically populate created_by and updated_by fields in Django REST Framework by leveraging HiddenFields, reducing boilerplate and improving data integrity

Mohamed Nossirat
Django & DRF Model Generic Auth Stuff

Integrate Django and Vite based Frontend

Want modern JavaScript without abandoning Django’s monolithic structure? This guide demonstrates how to use Vite to bundle Vue or React components inside a Django project, enabling hot‑module reloading and future‑proof asset management

Mohamed Nossirat
Integrate Django and Vite based Frontend

Pushing real-time updates to clients with Server-Sent Events (SSEs)

Long‑running tasks often need to send status updates back to the browser. This tutorial introduces Server‑Sent Events as a simple, one‑way streaming alternative to WebSockets, highlighting features like automatic reconnection and event IDs

Mohamed Nossirat
Pushing real-time updates to clients with Server-Sent Events (SSEs)

Django & Modern JS Frameworks Session Authentication

Django is one of the most popular backend web application frameworks that exists and it's written in Python. Vue.js is one of the most popular JavaScript tools for adding dynamic features to a web application.Django doesn't need Vue to run. Vue doesn't need Django to run. The combination gives developers an incredibly flexible and dynamic paradigm while also leveraging a number of the built-in benefits that each tool has.

Mohamed Nossirat
Django & Modern JS Frameworks Session Authentication

Integrating VueJS 2 into a Django

Integrating Vue into a Django project doesn’t require heavy tooling. This piece outlines a strategy where the Vue dev server handles local development while Django serves the built files in production, enabling gradual migration from a monolith to a microservice

Mohamed Nossirat
Integrating VueJS 2 into a Django

Django Rest Framework rich related serializer

Readable API responses shouldn’t compromise write operations. This article introduces a custom serializer field derived from DRF’s PrimaryKeyRelatedField that returns nested objects for reads while accepting primary keys for writes, yielding cleaner responses without sacrificing flexibility.

Mohamed Nossirat
Django Rest Framework rich related serializer