Blog

2025

Back to top ↑

2023

Django Formsets

less than 1 minute read

Django Formsets What: Multiple instances of the same form on one page (e.g. many products in one order). Same form, N times, one submit.

Django Email Testing

less than 1 minute read

Django Email Testing Idea: In tests, Django can use an in-memory backend so nothing is really sent. All “sent” emails go to mail.outbox (a list).

Django Signals

less than 1 minute read

Django Signals What: Observer pattern. Something happens (e.g. model save) → receivers run. Decouples “who did it” from “what runs after.”

DTOs (Data Transfer Objects)

less than 1 minute read

DTOs (Data Transfer Objects) What: Objects that carry data between layers (API ↔ service ↔ DB). Data only, no behavior (or minimal validation).

Dependency Injection

less than 1 minute read

Dependency Injection Idea: Don’t create dependencies inside a class; pass them in (constructor, param, or setter). Caller or a container provides the concret...

Python DateTime & Timezone

less than 1 minute read

Python DateTime & Timezone Rule of thumb: Store and compute in UTC. Convert to local only for display.

Celery Task Testing

less than 1 minute read

Celery Task Testing Goal: Test task logic without a real broker and without flakiness.

JS Promises: Promise.all vs Promise.allSettled

less than 1 minute read

JS Promises: Promise.all vs Promise.allSettled Promise.all(iterable) Resolves when all resolve; rejects as soon as one rejects (fail-fast). Result: arra...

Back to top ↑

2022

Django FBV vs CBV

less than 1 minute read

Django FBV vs CBV Reality: Both can do the same job. Choice = team + use case, not religion.

Deploy Django to Railway

less than 1 minute read

Deploy Django to Railway Prep: requirements.txt, Procfile, env-based settings, static files handled (e.g. Whitenoise).

Back to top ↑